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-ir-util.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source/slang/slang-ir-util.cpp') diff --git a/source/slang/slang-ir-util.cpp b/source/slang/slang-ir-util.cpp index 4a92d263e..dd6cd8892 100644 --- a/source/slang/slang-ir-util.cpp +++ b/source/slang/slang-ir-util.cpp @@ -1128,6 +1128,14 @@ IRVarLayout* findVarLayout(IRInst* value) } +UnownedStringSlice getBuiltinFuncName(IRInst* callee) +{ + auto decor = getResolvedInstForDecorations(callee)->findDecoration(); + if (!decor) + return UnownedStringSlice(); + return decor->getName(); +} + UnownedStringSlice getBasicTypeNameHint(IRType* basicType) { switch (basicType->getOp()) -- cgit v1.2.3