[dxvk] Add Xfb context state

This commit is contained in:
Philip Rebohle 2018-07-24 17:08:32 +02:00
parent 989a10ab88
commit 52e1671167
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 11 additions and 1 deletions

View File

@ -22,6 +22,7 @@ namespace dxvk {
*/
enum class DxvkContextFlag : uint64_t {
GpRenderPassBound, ///< Render pass is currently bound
GpXfbActive, ///< Transform feedback is enabled
GpClearRenderTargets, ///< Render targets need to be cleared
GpDirtyFramebuffer, ///< Framebuffer binding is out of date
GpDirtyPipeline, ///< Graphics pipeline binding is out of date
@ -31,6 +32,7 @@ namespace dxvk {
GpDirtyDescriptorSet, ///< Graphics descriptor set needs to be updated
GpDirtyVertexBuffers, ///< Vertex buffer bindings are out of date
GpDirtyIndexBuffer, ///< Index buffer binding are out of date
GpDirtyXfbBuffers, ///< Transform feedback buffer bindings are out of date
GpDirtyBlendConstants, ///< Blend constants have changed
GpDirtyStencilRef, ///< Stencil reference has changed
GpDirtyViewport, ///< Viewport state has changed
@ -86,6 +88,12 @@ namespace dxvk {
DxvkBlendConstants blendConstants = { 0.0f, 0.0f, 0.0f, 0.0f };
uint32_t stencilReference = 0;
};
struct DxvkXfbState {
std::array<DxvkBufferSlice, MaxNumXfbBuffers> buffers;
std::array<DxvkBufferSlice, MaxNumXfbBuffers> counters;
};
struct DxvkShaderStage {
@ -125,6 +133,7 @@ namespace dxvk {
DxvkViewportState vp;
DxvkDynamicDepthState ds;
DxvkOutputMergerState om;
DxvkXfbState xfb;
DxvkGraphicsPipelineState gp;
DxvkComputePipelineState cp;

View File

@ -8,7 +8,8 @@ namespace dxvk {
MaxNumRenderTargets = 8,
MaxNumVertexAttributes = 32,
MaxNumVertexBindings = 32,
MaxNumOutputStreams = 4,
MaxNumXfbBuffers = 4,
MaxNumXfbStreams = 4,
MaxNumViewports = 16,
MaxNumResourceSlots = 1216,
MaxNumActiveBindings = 128,