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-emit-c-like.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-emit-c-like.cpp')
| -rw-r--r-- | source/slang/slang-emit-c-like.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp index ff40d5b28..d337e09a0 100644 --- a/source/slang/slang-emit-c-like.cpp +++ b/source/slang/slang-emit-c-like.cpp @@ -1236,9 +1236,9 @@ String CLikeSourceEmitter::generateName(IRInst* inst) return linkageDecoration->getMangledName(); } - switch (inst->getOp()) + if (auto ptrType = as<IRPtrType>(inst)) { - case kIROp_HLSLConstBufferPointerType: + if (ptrType->getAddressSpace() == AddressSpace::UserPointer) { StringBuilder sb; sb << "BufferPointer_"; @@ -1246,9 +1246,8 @@ String CLikeSourceEmitter::generateName(IRInst* inst) sb << "_" << Int32(getID(inst)); return sb.produceString(); } - default: - break; } + // Otherwise fall back to a construct temporary name // for the instruction. StringBuilder sb; |
