summaryrefslogtreecommitdiff
path: root/source/slang/slang-lower-to-ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
-rw-r--r--source/slang/slang-lower-to-ir.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp
index ce6f8cb42..6ff270dc6 100644
--- a/source/slang/slang-lower-to-ir.cpp
+++ b/source/slang/slang-lower-to-ir.cpp
@@ -2290,14 +2290,12 @@ void addVarDecorations(IRGenContext* context, IRInst* inst, Decl* decl)
{
builder->addSimpleDecoration<IRGlobalInputDecoration>(inst);
}
- else if (auto glslLocationMod = as<GLSLLocationLayoutModifier>(mod))
+ else if (auto glslLocationMod = as<GLSLLocationAttribute>(mod))
{
builder->addDecoration(
inst,
kIROp_GLSLLocationDecoration,
- builder->getIntValue(
- builder->getIntType(),
- stringToInt(glslLocationMod->valToken.getContent())));
+ builder->getIntValue(builder->getIntType(), glslLocationMod->value));
}
else if (auto glslOffsetMod = as<GLSLOffsetLayoutAttribute>(mod))
{