summaryrefslogtreecommitdiff
path: root/source/slang/slang-check-modifier.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-check-modifier.cpp')
-rw-r--r--source/slang/slang-check-modifier.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/source/slang/slang-check-modifier.cpp b/source/slang/slang-check-modifier.cpp
index aa30f66ca..7721fedbf 100644
--- a/source/slang/slang-check-modifier.cpp
+++ b/source/slang/slang-check-modifier.cpp
@@ -474,6 +474,17 @@ namespace Slang
}
overloadRankAttr->rank = int32_t(rank->getValue());
}
+ else if (auto inputAttachmentIndexLayoutAttribute = as<GLSLInputAttachmentIndexLayoutAttribute>(attr))
+ {
+ if (attr->args.getCount() != 1)
+ return false;
+
+ auto location = checkConstantIntVal(attr->args[0]);
+ if(!location)
+ return false;
+
+ inputAttachmentIndexLayoutAttribute->location = location->getValue();
+ }
else if (auto bindingAttr = as<GLSLBindingAttribute>(attr))
{
// This must be vk::binding or gl::binding (as specified in core.meta.slang under vk_binding/gl_binding)
@@ -1105,7 +1116,7 @@ namespace Slang
case ASTNodeType::GLSLParsedLayoutModifier:
case ASTNodeType::GLSLConstantIDLayoutModifier:
case ASTNodeType::GLSLLocationLayoutModifier:
- case ASTNodeType::GLSLInputAttachmentIndexLayoutModifier:
+ case ASTNodeType::GLSLInputAttachmentIndexLayoutAttribute:
case ASTNodeType::GLSLOffsetLayoutAttribute:
case ASTNodeType::GLSLUnparsedLayoutModifier:
case ASTNodeType::GLSLLayoutModifierGroupMarker:
@@ -1185,7 +1196,7 @@ namespace Slang
case ASTNodeType::GLSLParsedLayoutModifier:
case ASTNodeType::GLSLConstantIDLayoutModifier:
case ASTNodeType::GLSLLocationLayoutModifier:
- case ASTNodeType::GLSLInputAttachmentIndexLayoutModifier:
+ case ASTNodeType::GLSLInputAttachmentIndexLayoutAttribute:
case ASTNodeType::GLSLOffsetLayoutAttribute:
case ASTNodeType::GLSLUnparsedLayoutModifier:
case ASTNodeType::GLSLLayoutModifierGroupMarker: