summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineD3D11
diff options
context:
space:
mode:
authorEgor Yusov <egor.yusov@gmail.com>2019-03-08 02:14:02 +0000
committerEgor Yusov <egor.yusov@gmail.com>2019-03-08 02:14:02 +0000
commitbe1319dd854481d75d51b2bfe85414fe3a3387ab (patch)
tree6052da4337c8957dd1a4cf56a163c92778dab290 /Graphics/GraphicsEngineD3D11
parentImproved buffer stride management in PSO (diff)
downloadDiligentCore-be1319dd854481d75d51b2bfe85414fe3a3387ab.tar.gz
DiligentCore-be1319dd854481d75d51b2bfe85414fe3a3387ab.zip
A bunch of minor code improvements
Diffstat (limited to 'Graphics/GraphicsEngineD3D11')
-rwxr-xr-xGraphics/GraphicsEngineD3D11/src/ShaderResourceLayoutD3D11.cpp14
1 files changed, 8 insertions, 6 deletions
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
}