From f53126ac1826e12314d9a16be5ae0cf1d22b57b1 Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 31 Dec 2020 20:54:15 -0800 Subject: D3D12 and VK backends: disabled bound resources validation in TransitionShaderResources since not all resources have to be bound --- .../GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'Graphics/GraphicsEngineD3D12') diff --git a/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp index c8927541..9506a081 100644 --- a/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/PipelineStateD3D12Impl.cpp @@ -955,15 +955,17 @@ ShaderResourceCacheD3D12* PipelineStateD3D12Impl::CommitAndTransitionShaderResou return nullptr; } - - if ((m_RootSig.GetTotalSrvCbvUavSlots(SHADER_RESOURCE_VARIABLE_TYPE_STATIC) != 0 || - m_RootSig.GetTotalRootViews(SHADER_RESOURCE_VARIABLE_TYPE_STATIC) != 0) && - !pResBindingD3D12Impl->StaticResourcesInitialized()) + if (Attrib.CommitResources) { - LOG_ERROR_MESSAGE("Static resources have not been initialized in the shader resource binding object being committed for PSO '", m_Desc.Name, "'. Please call IShaderResourceBinding::InitializeStaticResources()."); - } + if ((m_RootSig.GetTotalSrvCbvUavSlots(SHADER_RESOURCE_VARIABLE_TYPE_STATIC) != 0 || + m_RootSig.GetTotalRootViews(SHADER_RESOURCE_VARIABLE_TYPE_STATIC) != 0) && + !pResBindingD3D12Impl->StaticResourcesInitialized()) + { + LOG_ERROR_MESSAGE("Static resources have not been initialized in the shader resource binding object being committed for PSO '", m_Desc.Name, "'. Please call IShaderResourceBinding::InitializeStaticResources()."); + } - pResBindingD3D12Impl->dvpVerifyResourceBindings(this); + pResBindingD3D12Impl->dvpVerifyResourceBindings(this); + } #endif auto& ResourceCache = pResBindingD3D12Impl->GetResourceCache(); -- cgit v1.2.3