diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2021-03-18 22:05:18 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2021-03-19 00:38:25 +0000 |
| commit | ef1e1c02e4f44b3a37c6bb683090b4f661aadcdc (patch) | |
| tree | ab1bc97327e4596d9486fb42f3e96474edc90097 /Graphics/GraphicsEngineOpenGL | |
| parent | Few updates to PipelineStateD3D11Impl (diff) | |
| download | DiligentCore-ef1e1c02e4f44b3a37c6bb683090b4f661aadcdc.tar.gz DiligentCore-ef1e1c02e4f44b3a37c6bb683090b4f661aadcdc.zip | |
Removed duplicate code from unbinding incompatible signatures logic in D3D11, GL and Vk
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp index 1bff455e..4895efc0 100644 --- a/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp +++ b/Graphics/GraphicsEngineOpenGL/src/DeviceContextGLImpl.cpp @@ -169,29 +169,9 @@ void DeviceContextGLImpl::SetPipelineState(IPipelineState* pPipelineState) } #ifdef DILIGENT_DEVELOPMENT - // Find the first incompatible shader resource bindings - Uint32 sign = 0; - for (; sign < SignCount; ++sign) - { - const auto* pLayoutSign = m_pPipelineState->GetResourceSignature(sign); - const auto* pSRBSign = m_BindInfo.SRBs[sign] != nullptr ? m_BindInfo.SRBs[sign]->GetSignature() : nullptr; - - if ((pLayoutSign == nullptr || pLayoutSign->GetTotalResourceCount() == 0) != (pSRBSign == nullptr || pSRBSign->GetTotalResourceCount() == 0)) - { - // One signature is null or empty while the other is not - SRB is not compatible with the layout. - break; - } - - if (pLayoutSign != nullptr && pSRBSign != nullptr && pLayoutSign->IsIncompatibleWith(*pSRBSign)) - { - // Signatures are incompatible - break; - } - } - // Unbind incompatible SRB and SRB with a higher binding index. // This is the same behavior that used in Vulkan backend. - for (; sign < SignCount; ++sign) + for (auto sign = DvpGetCompatibleSignatureCount(m_BindInfo.SRBs.data()); sign < SignCount; ++sign) { m_BindInfo.SRBs[sign] = nullptr; m_BindInfo.ClearStaleSRBBit(sign); |
