From bb5f09fa8caa3a6314da5fa5cb743e35778ed7f6 Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 7 Apr 2019 12:12:18 -0700 Subject: Added DRAW_FLAG_VERIFY_DRAW_ATTRIBS, DRAW_FLAG_VERIFY_RENDER_TARGETS, and DRAW_FLAG_VERIFY_ALL flags (updated API Version to 240022) --- Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp | 5 ++++- .../GraphicsEngineD3D12/src/ShaderResourceBindingD3D12Impl.cpp | 9 ++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'Graphics/GraphicsEngineD3D12') diff --git a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp index d34bc493..905f522a 100644 --- a/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/DeviceContextD3D12Impl.cpp @@ -362,8 +362,11 @@ namespace Diligent void DeviceContextD3D12Impl::Draw( DrawAttribs& drawAttribs ) { #ifdef DEVELOPMENT - if (!DvpVerifyDrawArguments(drawAttribs)) + if ((drawAttribs.Flags & DRAW_FLAG_VERIFY_DRAW_ATTRIBS) != 0 && !DvpVerifyDrawArguments(drawAttribs)) return; + + if ((drawAttribs.Flags & DRAW_FLAG_VERIFY_RENDER_TARGETS) != 0) + DvpVerifyRenderTargets(); #endif const bool VerifyStates = (drawAttribs.Flags & DRAW_FLAG_VERIFY_STATES) != 0; diff --git a/Graphics/GraphicsEngineD3D12/src/ShaderResourceBindingD3D12Impl.cpp b/Graphics/GraphicsEngineD3D12/src/ShaderResourceBindingD3D12Impl.cpp index cee1c2a2..7d4c396f 100644 --- a/Graphics/GraphicsEngineD3D12/src/ShaderResourceBindingD3D12Impl.cpp +++ b/Graphics/GraphicsEngineD3D12/src/ShaderResourceBindingD3D12Impl.cpp @@ -109,7 +109,8 @@ IShaderResourceVariable* ShaderResourceBindingD3D12Impl::GetVariableByName(SHADE auto ResLayoutInd = m_ResourceLayoutIndex[ShaderInd]; if (ResLayoutInd < 0) { - LOG_WARNING_MESSAGE("Unable to find mutable/dynamic variable '", Name, "': shader stage ", GetShaderTypeLiteralName(ShaderType), " is inactive"); + LOG_WARNING_MESSAGE("Unable to find mutable/dynamic variable '", Name, "': shader stage ", GetShaderTypeLiteralName(ShaderType), + " is inactive in Pipeline State '", m_pPSO->GetDesc().Name, "'"); return nullptr; } return m_pShaderVarMgrs[ResLayoutInd].GetVariable(Name); @@ -121,7 +122,8 @@ Uint32 ShaderResourceBindingD3D12Impl::GetVariableCount(SHADER_TYPE ShaderType) auto ResLayoutInd = m_ResourceLayoutIndex[ShaderInd]; if (ResLayoutInd < 0) { - LOG_WARNING_MESSAGE("Unable to get the number of mutable/dynamic variables: shader stage ", GetShaderTypeLiteralName(ShaderType), " is inactive"); + LOG_WARNING_MESSAGE("Unable to get the number of mutable/dynamic variables: shader stage ", GetShaderTypeLiteralName(ShaderType), + " is inactive in Pipeline State '", m_pPSO->GetDesc().Name, "'"); return 0; } @@ -134,7 +136,8 @@ IShaderResourceVariable* ShaderResourceBindingD3D12Impl::GetVariableByIndex(SHAD auto ResLayoutInd = m_ResourceLayoutIndex[ShaderInd]; if (ResLayoutInd < 0) { - LOG_WARNING_MESSAGE("Unable to get mutable/dynamic variable at index ", Index, ": shader stage ", GetShaderTypeLiteralName(ShaderType), " is inactive"); + LOG_WARNING_MESSAGE("Unable to get mutable/dynamic variable at index ", Index, ": shader stage ", GetShaderTypeLiteralName(ShaderType), + " is inactive in Pipeline State '", m_pPSO->GetDesc().Name, "'"); return nullptr; } -- cgit v1.2.3