From ba9b2785c69c1b8c6d2b4103267b5281815f9f23 Mon Sep 17 00:00:00 2001 From: Jay Kwak <82421531+jkwak-work@users.noreply.github.com> Date: Thu, 30 Jan 2025 00:59:49 -0800 Subject: Support cooperative vector (#6223) * Support cooperative vector without Vulkan-header update Adding a Slang support for cooperative vector. But this commit doesn't have Vulkan-header update. --- source/slang/slang-emit-glsl.cpp | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source/slang/slang-emit-glsl.cpp') diff --git a/source/slang/slang-emit-glsl.cpp b/source/slang/slang-emit-glsl.cpp index 61457d98e..1429139f9 100644 --- a/source/slang/slang-emit-glsl.cpp +++ b/source/slang/slang-emit-glsl.cpp @@ -3370,6 +3370,23 @@ void GLSLSourceEmitter::emitSimpleTypeImpl(IRType* type) return; } + else if (auto specializedType = as(type)) + { + // If a `specialize` instruction made it this far, then + // it represents an intrinsic generic type. + // + emitSimpleType((IRType*)getSpecializedValue(specializedType)); + m_writer->emit("<"); + UInt argCount = specializedType->getArgCount(); + for (UInt ii = 0; ii < argCount; ++ii) + { + if (ii != 0) + m_writer->emit(", "); + emitVal(specializedType->getArg(ii), getInfo(EmitOp::General)); + } + m_writer->emit(" >"); + return; + } auto decorated = getResolvedInstForDecorations(type); UnownedStringSlice intrinsicDef; -- cgit v1.2.3