From 23c65b873f8002b74d60f61cacb3614da60e078d Mon Sep 17 00:00:00 2001 From: Yong He Date: Mon, 5 Feb 2024 22:36:02 -0800 Subject: Add per-buffer data layout control. (#3551) * Add per-buffer data layout control. Fixes #3534. * Fixes. * Robustness. * Update test. * Fix. --- source/slang/slang-emit-cpp.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/slang/slang-emit-cpp.cpp') 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(type)) + operandCount = 1; + if (operandCount) { m_writer->emit("<"); -- cgit v1.2.3