diff options
| author | Yong He <yonghe@outlook.com> | 2025-03-06 14:26:34 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-06 14:26:34 -0800 |
| commit | 4485cf3eaf142cfd5f8470e86739acc67d4e12ea (patch) | |
| tree | c6ce220dfe5f3ab25ea558f2512f3761c9565c69 /source/slang/slang-lower-to-ir.cpp | |
| parent | 55dd2deaff82bbdb72e125ba4b350030b7e5f427 (diff) | |
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.
Diffstat (limited to 'source/slang/slang-lower-to-ir.cpp')
| -rw-r--r-- | source/slang/slang-lower-to-ir.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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. |
