diff options
| author | Gangzheng Tong <tonggangzheng@gmail.com> | 2025-08-18 21:19:01 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-08-18 21:19:01 -0700 |
| commit | ae1a93b579ed276d2455e1b97ca65ad4727d56d0 (patch) | |
| tree | 5892061b616363a9ca45f8b24e58f7fccccb74ca /source/slang | |
| parent | e9a309678f55a59bb012a931af2c1b734968a13d (diff) | |
Emit descriptor handle correctly for ParameterBlock<DescriptorHandle> (#8206)
In Metal, if `ParameterBlock` contains `DescriptorHandle` directly, it
would be emitted as DescriptorHandle literal, which is not valid Metal
code,
This fix adds a case for `kIROp_DescriptorHandleType` and directs it to
the Parent's `emitType` function to handle it.
Diffstat (limited to 'source/slang')
| -rw-r--r-- | source/slang/slang-emit-metal.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-emit-metal.cpp b/source/slang/slang-emit-metal.cpp index 1915be58b..9858e51a1 100644 --- a/source/slang/slang-emit-metal.cpp +++ b/source/slang/slang-emit-metal.cpp @@ -1102,6 +1102,9 @@ void MetalSourceEmitter::emitSimpleTypeImpl(IRType* type) case kIROp_StructType: m_writer->emit(getName(type)); return; + case kIROp_DescriptorHandleType: + emitType(type); + return; case kIROp_DoubleType: SLANG_UNEXPECTED("'double' type emitted"); |
