diff options
| author | Yong He <yonghe@outlook.com> | 2023-08-10 14:58:41 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-10 14:58:41 -0700 |
| commit | 38b0af3537f5d8412f0d69e39e38c5603ff62c15 (patch) | |
| tree | 5892b0b2427f0de0057259949e03105ec766143a /source/slang/slang-emit-c-like.cpp | |
| parent | 60ebadab1ec269c7017148a028307a9b5f32b1d4 (diff) | |
Add support for ConstBufferPointer on Vulkan. (#3089)
* Add support for `ConstBufferPointer` on Vulkan.
* Add spv compilation test.
* Fix.
* Fix code review issues.
---------
Co-authored-by: Yong He <yhe@nvidia.com>
Diffstat (limited to 'source/slang/slang-emit-c-like.cpp')
| -rw-r--r-- | source/slang/slang-emit-c-like.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp index e2faba808..0cc3a196b 100644 --- a/source/slang/slang-emit-c-like.cpp +++ b/source/slang/slang-emit-c-like.cpp @@ -966,6 +966,19 @@ String CLikeSourceEmitter::generateName(IRInst* inst) return linkageDecoration->getMangledName(); } + switch (inst->getOp()) + { + case kIROp_HLSLConstBufferPointerType: + { + StringBuilder sb; + sb << "BufferPointer_"; + sb << getName(inst->getOperand(0)); + sb << "_" << Int32(getID(inst)); + return sb.produceString(); + } + default: + break; + } // Otherwise fall back to a construct temporary name // for the instruction. StringBuilder sb; @@ -3743,7 +3756,6 @@ void CLikeSourceEmitter::emitGlobalInstImpl(IRInst* inst) case kIROp_InterfaceType: emitInterface(cast<IRInterfaceType>(inst)); break; - case kIROp_WitnessTable: emitWitnessTable(cast<IRWitnessTable>(inst)); break; |
