diff options
| author | Darren <65404740+fairywreath@users.noreply.github.com> | 2024-12-15 13:43:19 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-15 10:43:19 -0800 |
| commit | 83f4bd5dcd7480fd4339b2b08dc23ab0763b2ffe (patch) | |
| tree | ff34f1de08d21fcf94e666e6c6d4cca2d7eaf7aa /source/slang/slang-lower-to-ir.cpp | |
| parent | 9d608b959c0ae6ebf556a2dce6ec384451ddc519 (diff) | |
Enable exprs for all supported GLSL layout qualifiers (#5857)
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
| -rw-r--r-- | source/slang/slang-lower-to-ir.cpp | 6 |
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)) { |
