summaryrefslogtreecommitdiffstats
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.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/source/slang/parameter-binding.cpp b/source/slang/parameter-binding.cpp
index ced8d7af2..40491c4df 100644
--- a/source/slang/parameter-binding.cpp
+++ b/source/slang/parameter-binding.cpp
@@ -977,7 +977,7 @@ getTypeLayoutForGlobalShaderParameter_GLSL(
// 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<GLSLPushConstantLayoutModifier>() && type->As<ConstantBufferType>() )
+ if( varDecl->HasModifier<PushConstantAttribute>() && type->As<ConstantBufferType>() )
{
return CreateTypeLayout(
layoutContext.with(rules->getPushConstantBufferRules()),
@@ -1043,6 +1043,15 @@ getTypeLayoutForGlobalShaderParameter_HLSL(
auto rules = layoutContext.getRulesFamily();
auto type = varDecl->getType();
+ // 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>())
+ {
+ return CreateTypeLayout(
+ layoutContext.with(rules->getPushConstantBufferRules()),
+ type);
+ }
+
// HLSL `static` modifier indicates "thread local"
if(varDecl->HasModifier<HLSLStaticModifier>())
return nullptr;