From 4c0e4fba0c52d3d4224380957d844b3a739819d7 Mon Sep 17 00:00:00 2001 From: Philip Rebohle Date: Thu, 28 Nov 2019 15:25:12 +0100 Subject: [PATCH] [dxvk] Don't return a value from updateShaderResources We're checking the bind point all the time anyway, so the previous design was inconsistent. --- src/dxvk/dxvk_context.cpp | 23 ++++++++++------------- src/dxvk/dxvk_context.h | 2 +- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/src/dxvk/dxvk_context.cpp b/src/dxvk/dxvk_context.cpp index c411e9de..521f7e2e 100644 --- a/src/dxvk/dxvk_context.cpp +++ b/src/dxvk/dxvk_context.cpp @@ -3853,10 +3853,8 @@ namespace dxvk { void DxvkContext::updateComputeShaderResources() { if ((m_flags.test(DxvkContextFlag::CpDirtyResources)) - || (m_state.cp.pipeline->layout()->hasStaticBufferBindings())) { - if (this->updateShaderResources(m_state.cp.pipeline->layout())) - m_flags.set(DxvkContextFlag::CpDirtyPipelineState); - } + || (m_state.cp.pipeline->layout()->hasStaticBufferBindings())) + this->updateShaderResources(m_state.cp.pipeline->layout()); this->updateShaderDescriptorSetBinding( m_cpSet, m_state.cp.pipeline->layout()); @@ -3868,10 +3866,8 @@ namespace dxvk { void DxvkContext::updateGraphicsShaderResources() { if ((m_flags.test(DxvkContextFlag::GpDirtyResources)) - || (m_state.gp.pipeline->layout()->hasStaticBufferBindings())) { - if (this->updateShaderResources(m_state.gp.pipeline->layout())) - m_flags.set(DxvkContextFlag::GpDirtyPipelineState); - } + || (m_state.gp.pipeline->layout()->hasStaticBufferBindings())) + this->updateShaderResources(m_state.gp.pipeline->layout()); this->updateShaderDescriptorSetBinding( m_gpSet, m_state.gp.pipeline->layout()); @@ -3882,7 +3878,7 @@ namespace dxvk { template - bool DxvkContext::updateShaderResources(const DxvkPipelineLayout* layout) { + void DxvkContext::updateShaderResources(const DxvkPipelineLayout* layout) { std::array descriptors; // Assume that all bindings are active as a fast path @@ -4060,12 +4056,13 @@ namespace dxvk { // If some resources are not bound, we may need to // update spec constants and rebind the pipeline - bool updatePipelineState = refMask != bindMask; - - if (updatePipelineState) + if (refMask != bindMask) { refMask = bindMask; - return updatePipelineState; + m_flags.set(BindPoint == VK_PIPELINE_BIND_POINT_GRAPHICS + ? DxvkContextFlag::GpDirtyPipelineState + : DxvkContextFlag::CpDirtyPipelineState); + } } diff --git a/src/dxvk/dxvk_context.h b/src/dxvk/dxvk_context.h index 1af2a8cd..12f3d2ac 100644 --- a/src/dxvk/dxvk_context.h +++ b/src/dxvk/dxvk_context.h @@ -1151,7 +1151,7 @@ namespace dxvk { void updateGraphicsShaderResources(); template - bool updateShaderResources( + void updateShaderResources( const DxvkPipelineLayout* layout); template