From 9c17d0be79834a8ebe2888aed8905bae355cb674 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Fri, 11 Oct 2019 14:14:08 -0400 Subject: Support for unbounded array of arrays (#1078) * WIP: Unsized arrays on CPU. * unbounded-array-of-array working on CPU. * Remove some left over comments. --- source/slang/slang-emit-cpp.cpp | 10 ++++++++++ 1 file changed, 10 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 2aea0cae9..479359d6b 100644 --- a/source/slang/slang-emit-cpp.cpp +++ b/source/slang/slang-emit-cpp.cpp @@ -544,6 +544,16 @@ SlangResult CPPSourceEmitter::_calcTypeName(IRType* type, CodeGenTarget target, out << ", " << elementCount << ">"; return SLANG_OK; } + case kIROp_UnsizedArrayType: + { + auto arrayType = static_cast(type); + auto elementType = arrayType->getElementType(); + + out << "Array<"; + SLANG_RETURN_ON_FAIL(_calcTypeName(elementType, target, out)); + out << ">"; + return SLANG_OK; + } default: { if (isNominalOp(type->op)) -- cgit v1.2.3