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 --- .../GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp index 35ef4240..72882d7e 100644 --- a/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/PipelineStateVkImpl.cpp @@ -898,6 +898,7 @@ void PipelineStateVkImpl::CommitAndTransitionShaderResources(IShaderResourceBind #endif auto* pResBindingVkImpl = ValidatedCast(pShaderResourceBinding); + auto& ResourceCache = pResBindingVkImpl->GetResourceCache(); #ifdef DILIGENT_DEVELOPMENT { @@ -909,18 +910,17 @@ void PipelineStateVkImpl::CommitAndTransitionShaderResources(IShaderResourceBind } } - if (m_HasStaticResources && !pResBindingVkImpl->StaticResourcesInitialized()) + if (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()."); - } -#endif - - auto& ResourceCache = pResBindingVkImpl->GetResourceCache(); + if (m_HasStaticResources && !pResBindingVkImpl->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()."); + } -#ifdef DILIGENT_DEVELOPMENT - for (Uint32 s = 0; s < GetNumShaderStages(); ++s) - { - m_ShaderResourceLayouts[s].dvpVerifyBindings(ResourceCache); + for (Uint32 s = 0; s < GetNumShaderStages(); ++s) + { + m_ShaderResourceLayouts[s].dvpVerifyBindings(ResourceCache); + } } #endif #ifdef DILIGENT_DEBUG -- cgit v1.2.3