summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2021-01-31 02:55:52 +0000
committerassiduous <assiduous@diligentgraphics.com>2021-01-31 02:55:52 +0000
commitde85b057ac277334eb47850dc30f58879ecc3c32 (patch)
tree5e4f92d0156ff15d9bb1440befb917e4026a8cc1 /Graphics/GraphicsEngine
parentPipeline resource signature Vk: removed texel buffers with dynamic offsets as... (diff)
downloadDiligentCore-de85b057ac277334eb47850dc30f58879ecc3c32.tar.gz
DiligentCore-de85b057ac277334eb47850dc30f58879ecc3c32.zip
Pipeline resource singature Vk: few updates to buffer bindings
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp22
1 files changed, 17 insertions, 5 deletions
diff --git a/Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp b/Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp
index cec025c1..dbd7fb46 100644
--- a/Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp
+++ b/Graphics/GraphicsEngine/include/ShaderResourceVariableBase.hpp
@@ -186,7 +186,7 @@ bool VerifyConstantBufferBinding(const char* ResName,
{
ss << " in shader '" << ShaderName << '\'';
}
- ss << ". The variable uses PIPELINE_RESOURCE_FLAG_NO_DYNAMIC_BUFFERS flag.";
+ ss << ". The variable was initialized with PIPELINE_RESOURCE_FLAG_NO_DYNAMIC_BUFFERS flag.";
LOG_ERROR_MESSAGE(ss.str());
BindingOK = false;
}
@@ -212,7 +212,11 @@ bool VerifyConstantBufferBinding(const char* ResName,
{
ss << "null";
}
- ss << " is an error and may cause unpredicted behavior. Use another shader resource binding instance or label the variable as dynamic.";
+ ss << " is an error and may cause unpredicted behavior.";
+
+ if (VarType == SHADER_RESOURCE_VARIABLE_TYPE_MUTABLE)
+ ss << " Use another shader resource binding instance or label the variable as dynamic.";
+
LOG_ERROR_MESSAGE(ss.str());
BindingOK = false;
@@ -318,7 +322,7 @@ bool VerifyResourceViewBinding(const char* ResName,
{
const char* ExpectedResourceType = GetResourceTypeName<ViewTypeEnumType>();
- if (pView && !pViewImpl)
+ if (pView != nullptr && pViewImpl == nullptr)
{
std::stringstream ss;
ss << "Failed to bind resource '" << pView->GetDesc().Name << "' to variable '" << GetShaderResourcePrintName(ResName, ArraySize, ArrayIndex) << '\'';
@@ -395,7 +399,11 @@ bool VerifyResourceViewBinding(const char* ResName,
{
ss << "null";
}
- ss << " is an error and may cause unpredicted behavior. Use another shader resource binding instance or label the variable as dynamic.";
+ ss << " is an error and may cause unpredicted behavior.";
+
+ if (VarType == SHADER_RESOURCE_VARIABLE_TYPE_MUTABLE)
+ ss << " Use another shader resource binding instance or label the variable as dynamic.";
+
LOG_ERROR_MESSAGE(ss.str());
BindingOK = false;
@@ -449,7 +457,11 @@ bool VerifyTLASResourceBinding(const char* ResName,
{
ss << "null";
}
- ss << " is an error and may cause unpredicted behavior. Use another shader resource binding instance or label the variable as dynamic.";
+ ss << " is an error and may cause unpredicted behavior.";
+
+ if (VarType == SHADER_RESOURCE_VARIABLE_TYPE_MUTABLE)
+ ss << " Use another shader resource binding instance or label the variable as dynamic.";
+
LOG_ERROR_MESSAGE(ss.str());
BindingOK = false;