diff options
Diffstat (limited to 'source/slang/slang-emit-cpp.cpp')
| -rw-r--r-- | source/slang/slang-emit-cpp.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/slang/slang-emit-cpp.cpp b/source/slang/slang-emit-cpp.cpp index 6f97a11da..8e95cebfb 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -1152,8 +1152,16 @@ void CPPSourceEmitter::_emitType(IRType* type, DeclaratorInfo* declarator) auto arrayType = static_cast<IRArrayType*>(type); auto elementType = arrayType->getElementType(); int elementCount = int(getIntVal(arrayType->getElementCount())); - - m_writer->emit("FixedArray<"); + auto nameHint = arrayType->findDecoration<IRNameHintDecoration>(); + bool isCoopVec = nameHint && (nameHint->getName() == UnownedStringSlice("CoopVec")); + if (isCoopVec && isOptixCoopVec) + { + m_writer->emit("OptixCoopVec<"); + } + else + { + m_writer->emit("FixedArray<"); + } _emitType(elementType, nullptr); m_writer->emit(", "); m_writer->emit(elementCount); |
