summaryrefslogtreecommitdiff
path: root/source/slang/parameter-binding.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/parameter-binding.cpp')
-rw-r--r--source/slang/parameter-binding.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/slang/parameter-binding.cpp b/source/slang/parameter-binding.cpp
index 58891a956..622474116 100644
--- a/source/slang/parameter-binding.cpp
+++ b/source/slang/parameter-binding.cpp
@@ -1184,6 +1184,13 @@ getTypeLayoutForGlobalShaderParameter_HLSL(
auto rules = layoutContext.getRulesFamily();
auto type = varDecl->getType();
+ if( varDecl->HasModifier<ShaderRecordNVLayoutModifier>() && type->As<ConstantBufferType>() )
+ {
+ return CreateTypeLayout(
+ layoutContext.with(rules->getShaderRecordConstantBufferRules()),
+ type);
+ }
+
// We want to check for a constant-buffer type with a `push_constant` layout
// qualifier before we move on to anything else.
if (varDecl->HasModifier<PushConstantAttribute>() && type->As<ConstantBufferType>())