1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-03-15 07:29:17 +01:00

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

View File

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