diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index 519bba4ff..c411e9deb 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -3853,45 +3853,31 @@ namespace dxvk { void DxvkContext::updateComputeShaderResources() { if ((m_flags.test(DxvkContextFlag::CpDirtyResources)) - || (m_flags.test(DxvkContextFlag::CpDirtyDescriptorBinding) - && m_state.cp.pipeline->layout()->hasStaticBufferBindings())) { - m_flags.clr(DxvkContextFlag::CpDirtyResources); - + || (m_state.cp.pipeline->layout()->hasStaticBufferBindings())) { if (this->updateShaderResources(m_state.cp.pipeline->layout())) m_flags.set(DxvkContextFlag::CpDirtyPipelineState); - - m_flags.set(DxvkContextFlag::CpDirtyDescriptorBinding); } - } - - - void DxvkContext::updateComputeShaderDescriptors() { + this->updateShaderDescriptorSetBinding( m_cpSet, m_state.cp.pipeline->layout()); - m_flags.clr(DxvkContextFlag::CpDirtyDescriptorBinding); + m_flags.clr(DxvkContextFlag::CpDirtyResources, + DxvkContextFlag::CpDirtyDescriptorBinding); } void DxvkContext::updateGraphicsShaderResources() { if ((m_flags.test(DxvkContextFlag::GpDirtyResources)) - || (m_flags.test(DxvkContextFlag::GpDirtyDescriptorBinding) - && m_state.gp.pipeline->layout()->hasStaticBufferBindings())) { - m_flags.clr(DxvkContextFlag::GpDirtyResources); - + || (m_state.gp.pipeline->layout()->hasStaticBufferBindings())) { if (this->updateShaderResources(m_state.gp.pipeline->layout())) m_flags.set(DxvkContextFlag::GpDirtyPipelineState); - - m_flags.set(DxvkContextFlag::GpDirtyDescriptorBinding); } - } - - - void DxvkContext::updateGraphicsShaderDescriptors() { + this->updateShaderDescriptorSetBinding( m_gpSet, m_state.gp.pipeline->layout()); - m_flags.clr(DxvkContextFlag::GpDirtyDescriptorBinding); + m_flags.clr(DxvkContextFlag::GpDirtyResources, + DxvkContextFlag::GpDirtyDescriptorBinding); } @@ -4336,9 +4322,6 @@ namespace dxvk { return false; } - if (m_flags.test(DxvkContextFlag::CpDirtyDescriptorBinding)) - this->updateComputeShaderDescriptors(); - if (m_flags.test(DxvkContextFlag::DirtyPushConstants)) this->updatePushConstants(); @@ -4385,9 +4368,6 @@ namespace dxvk { if (m_flags.test(DxvkContextFlag::GpDirtyPredicate)) this->updateConditionalRendering(); - if (m_flags.test(DxvkContextFlag::GpDirtyDescriptorBinding)) - this->updateGraphicsShaderDescriptors(); - if (m_flags.any( DxvkContextFlag::GpDirtyViewport, DxvkContextFlag::GpDirtyBlendConstants, diff --git a/src/dxvk/dxvk_context.h b/src/dxvk/dxvk_context.h index fd8b3a3e7..1af2a8cdf 100644 --- a/src/dxvk/dxvk_context.h +++ b/src/dxvk/dxvk_context.h @@ -1148,10 +1148,7 @@ namespace dxvk { bool updateGraphicsPipelineState(); void updateComputeShaderResources(); - void updateComputeShaderDescriptors(); - void updateGraphicsShaderResources(); - void updateGraphicsShaderDescriptors(); template bool updateShaderResources(