diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2025-01-30 00:59:49 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-30 00:59:49 -0800 |
| commit | ba9b2785c69c1b8c6d2b4103267b5281815f9f23 (patch) | |
| tree | e4ba4ca76c6592b90764a0a7ac32502639dc93aa /source/slang/slang-emit-hlsl.cpp | |
| parent | 2ae194d51e15c064c3d905e628f7335de7504e32 (diff) | |
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.
Diffstat (limited to 'source/slang/slang-emit-hlsl.cpp')
| -rw-r--r-- | source/slang/slang-emit-hlsl.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
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<IRAtomicType>(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<IRConstRefType>(type)->getValueType()); |
