From f920b651a8c4cd4a61155eef0f6a48b45024578a Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Mon, 27 Aug 2018 18:18:53 -0700 Subject: Fixed a problem with accessing variables in inactive shader stages in D3D11 backend; improved error messages --- Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Graphics/GraphicsEngineVulkan') diff --git a/Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp b/Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp index abc033e0..18be6d30 100644 --- a/Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp +++ b/Graphics/GraphicsEngineVulkan/src/ShaderResourceBindingVkImpl.cpp @@ -107,7 +107,7 @@ IShaderVariable* ShaderResourceBindingVkImpl::GetVariable(SHADER_TYPE ShaderType auto ResLayoutInd = m_ResourceLayoutIndex[ShaderInd]; if (ResLayoutInd < 0) { - LOG_ERROR("Failed to find variable \"", Name,"\" in shader resource binding: shader type ", GetShaderTypeLiteralName(ShaderType), " is not initialized"); + LOG_ERROR("Unable to find mutable/dynamic variable '", Name, "': shader stage ", GetShaderTypeLiteralName(ShaderType), " is inactive"); return nullptr; } return m_pShaderVarMgrs[ResLayoutInd].GetVariable(Name); @@ -119,7 +119,7 @@ Uint32 ShaderResourceBindingVkImpl::GetVariableCount(SHADER_TYPE ShaderType) con auto ResLayoutInd = m_ResourceLayoutIndex[ShaderInd]; if (ResLayoutInd < 0) { - LOG_ERROR("Unable to get the number of varibles for shader type ", GetShaderTypeLiteralName(ShaderType), ": shader stage is not initialized"); + LOG_ERROR("Unable to get the number of mutable/dynamic variables: shader stage ", GetShaderTypeLiteralName(ShaderType), " is inactive"); return 0; } return m_pShaderVarMgrs[ResLayoutInd].GetVariableCount(); @@ -131,7 +131,7 @@ IShaderVariable* ShaderResourceBindingVkImpl::GetVariable(SHADER_TYPE ShaderType auto ResLayoutInd = m_ResourceLayoutIndex[ShaderInd]; if (ResLayoutInd < 0) { - LOG_ERROR("Failed to find variable at index \"", Index, "\" in shader resource binding: shader type ", GetShaderTypeLiteralName(ShaderType), " is not initialized"); + LOG_ERROR("Unable to get mutable/dynamic variable at index ", Index, ": shader stage ", GetShaderTypeLiteralName(ShaderType), " is inactive"); return nullptr; } return m_pShaderVarMgrs[ResLayoutInd].GetVariable(Index); -- cgit v1.2.3