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.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/slang/parameter-binding.cpp b/source/slang/parameter-binding.cpp
index e5fddac02..ced8d7af2 100644
--- a/source/slang/parameter-binding.cpp
+++ b/source/slang/parameter-binding.cpp
@@ -1413,10 +1413,13 @@ static void addExplicitParameterBindings_GLSL(
if( (resInfo = typeLayout->FindResourceInfo(LayoutResourceKind::DescriptorTableSlot)) != nullptr )
{
// Try to find `binding` and `set`
- if(!findLayoutArg<GLSLBindingLayoutModifier>(varDecl, &semanticInfo.index))
+ auto attr = varDecl.getDecl()->FindModifier<GLSLBindingAttribute>();
+ if (!attr)
+ {
return;
-
- findLayoutArg<GLSLSetLayoutModifier>(varDecl, &semanticInfo.space);
+ }
+ semanticInfo.index = attr->binding;
+ semanticInfo.space = attr->set;
}
else if( (resInfo = typeLayout->FindResourceInfo(LayoutResourceKind::VertexInput)) != nullptr )
{