From 4485cf3eaf142cfd5f8470e86739acc67d4e12ea Mon Sep 17 00:00:00 2001 From: Yong He Date: Thu, 6 Mar 2025 14:26:34 -0800 Subject: Update SPIRV-Tools and fix new validation errors. (#6511) * Update SPIRV-Tools and fix new validation errors. * Implement pointers for glsl target. * Reworked packStorage/unpackStorage code gen to operate on pointers rather than values. --- source/slang/slang-lower-to-ir.cpp | 11 +++++++++-- 1 file changed, 9 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 4d692b727..9ca22fead 100644 --- a/source/slang/slang-lower-to-ir.cpp +++ b/source/slang/slang-lower-to-ir.cpp @@ -870,8 +870,15 @@ LoweredValInfo emitCallToDeclRef( return LoweredValInfo::simple(args[0]); } auto intrinsicOp = getIntrinsicOp(funcDecl, intrinsicOpModifier); - return LoweredValInfo::simple( - builder->emitIntrinsicInst(type, IROp(intrinsicOp), argCount, args)); + switch (IROp(intrinsicOp)) + { + case kIROp_GetOffsetPtr: + SLANG_ASSERT(argCount == 2); + return LoweredValInfo::simple(builder->emitGetOffsetPtr(args[0], args[1])); + default: + return LoweredValInfo::simple( + builder->emitIntrinsicInst(type, IROp(intrinsicOp), argCount, args)); + } } // Fallback case is to emit an actual call. -- cgit v1.2.3