From ebe8ddefc48478307d5f206cd3e40c41d28a36e3 Mon Sep 17 00:00:00 2001 From: Yong He Date: Tue, 26 Sep 2023 23:56:06 -0700 Subject: Various SPIRV fixes. (#3231) * Various SPIRV fixes. - Geometry shader support (WIP). - Fix texture get dimension and load. - Fold global GetElement(MakeArray/MakeVector) insts. - Call spvopt to inline all functions. - Translate OpImageSubscript. - Emit struct member names and global variable names. - Fix lowering of OpBitNot -> OpNot, instead of OpBitReverse. * Fix test. * Fix geometry shader. * Fix geometry shader emit. * Add atomic Image access test. * Fix tests. * don't fail if spirv-opt fails. * Update comments. * Fix test. * Cleanups. * indentation --------- Co-authored-by: Yong He Co-authored-by: Ellie Hermaszewska --- source/slang/slang-lower-to-ir.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/slang/slang-lower-to-ir.cpp') diff --git a/source/slang/slang-lower-to-ir.cpp b/source/slang/slang-lower-to-ir.cpp index b3a309d5a..452b24c30 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -1364,12 +1364,12 @@ static void addLinkageDecoration( ? pyExportModifier->name.getUnownedSlice() : decl->getName()->text.getUnownedSlice()); } - else if (as(modifier)) + else if (auto knownBuiltinModifier = as(modifier)) { // We add this to the internal instruction, like other name-like // decorations, for instance "nameHint". This prevents it becoming // lost during specialization. - builder->addKnownBuiltinDecoration(inInst, decl->getName()->text.getUnownedSlice()); + builder->addKnownBuiltinDecoration(inInst, knownBuiltinModifier->name.getUnownedSlice()); } } if (as(decl->parentDecl) && -- cgit v1.2.3