diff options
| author | Yong He <yonghe@outlook.com> | 2024-02-05 22:36:02 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-02-05 22:36:02 -0800 |
| commit | 23c65b873f8002b74d60f61cacb3614da60e078d (patch) | |
| tree | 9629ffeed059cd67e70d5a98427922697ba46543 /source/slang/slang-emit-cpp.cpp | |
| parent | af035fb6da2a19ccc647515e9b1edf35777f8c89 (diff) | |
Add per-buffer data layout control. (#3551)
* Add per-buffer data layout control.
Fixes #3534.
* Fixes.
* Robustness.
* Update test.
* Fix.
Diffstat (limited to 'source/slang/slang-emit-cpp.cpp')
| -rw-r--r-- | source/slang/slang-emit-cpp.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index 95a6ea4ff..58c635d90 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -352,6 +352,9 @@ SlangResult CPPSourceEmitter::calcTypeName(IRType* type, CodeGenTarget target, S // Assumes ordering of types matches ordering of operands. UInt operandCount = type->getOperandCount(); + if (as<IRHLSLStructuredBufferTypeBase>(type)) + operandCount = 1; + if (operandCount) { m_writer->emit("<"); |
