From be1319dd854481d75d51b2bfe85414fe3a3387ab Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Thu, 7 Mar 2019 18:14:02 -0800 Subject: A bunch of minor code improvements --- .../GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'Graphics/GraphicsEngineD3D11') diff --git a/Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp b/Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp index 262902b0..1ef0c9c2 100755 --- a/Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp +++ b/Graphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp @@ -203,10 +203,12 @@ ShaderResourceLayoutD3D11::ShaderResourceLayoutD3D11(IObject& { const auto& AssignedSamplerAttribs = m_pResources->GetCombinedSampler(TexSRV); auto AssignedSamplerType = m_pResources->FindVariableType(AssignedSamplerAttribs, ResourceLayout); - DEV_CHECK_ERR(AssignedSamplerType == VarType, - "The type (", GetShaderVariableTypeLiteralName(VarType),") of texture SRV variable '", TexSRV.Name, - "' is not consistent with the type (", GetShaderVariableTypeLiteralName(AssignedSamplerType), - ") of the sampler '", AssignedSamplerAttribs.Name, "' that is assigned to it"); + VERIFY(AssignedSamplerType == VarType, + "The type (", GetShaderVariableTypeLiteralName(VarType),") of texture SRV variable '", TexSRV.Name, + "' is not consistent with the type (", GetShaderVariableTypeLiteralName(AssignedSamplerType), + ") of the sampler '", AssignedSamplerAttribs.Name, "' that is assigned to it. " + "This should never happen as when combined texture samplers are used, the type of the sampler " + "is derived from the type of the texture it is assigned to SRV."); bool SamplerFound = false; for (AssignedSamplerIndex = 0; AssignedSamplerIndex < NumSamplers; ++AssignedSamplerIndex) @@ -223,7 +225,7 @@ ShaderResourceLayoutD3D11::ShaderResourceLayoutD3D11(IObject& #ifdef _DEBUG if (m_pResources->FindStaticSampler(AssignedSamplerAttribs, ResourceLayout) < 0) { - LOG_ERROR("Unable to find non-static sampler assigned to texture SRV '", TexSRV.Name, "'. This seems to be a bug."); + UNEXPECTED("Unable to find non-static sampler assigned to texture SRV '", TexSRV.Name, "'."); } #endif } @@ -232,7 +234,7 @@ ShaderResourceLayoutD3D11::ShaderResourceLayoutD3D11(IObject& #ifdef _DEBUG if (m_pResources->FindStaticSampler(AssignedSamplerAttribs, ResourceLayout) >= 0) { - LOG_ERROR("Static sampler '", AssignedSamplerAttribs.Name, "' is assigned to texture SRV '", TexSRV.Name, "'. This seems to be a bug."); + UNEXPECTED("Static sampler '", AssignedSamplerAttribs.Name, "' is assigned to texture SRV '", TexSRV.Name, "'."); } #endif } -- cgit v1.2.3