diff options
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); |
