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-hlsl.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source/slang/slang-emit-hlsl.cpp') diff --git a/source/slang/slang-emit-hlsl.cpp b/source/slang/slang-emit-hlsl.cpp index 7bd3bb3db..53545b31f 100644 --- a/source/slang/slang-emit-hlsl.cpp +++ b/source/slang/slang-emit-hlsl.cpp @@ -765,6 +765,7 @@ bool HLSLSourceEmitter::tryEmitInstExprImpl(IRInst* inst, const EmitOpInfo& inOu m_writer->emit("GroupMemoryBatrierWithGroupSync();\n"); return true; } + case kIROp_MakeCoopVector: case kIROp_MakeVector: case kIROp_MakeMatrix: { @@ -1359,6 +1360,16 @@ void HLSLSourceEmitter::emitSimpleTypeImpl(IRType* type) emitSimpleTypeImpl(cast(type)->getElementType()); return; } + case kIROp_CoopVectorType: + { + auto coopVecType = (IRCoopVectorType*)type; + m_writer->emit("CoopVector<"); + emitType(coopVecType->getElementType()); + m_writer->emit(","); + m_writer->emit(getIntVal(coopVecType->getElementCount())); + m_writer->emit(">"); + return; + } case kIROp_ConstRefType: { emitSimpleTypeImpl(as(type)->getValueType()); -- cgit v1.2.3