diff options
| author | Jay Kwak <82421531+jkwak-work@users.noreply.github.com> | 2025-05-15 02:57:47 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-14 19:57:47 -0700 |
| commit | b4d3d3017640581c21b52a12413d3f074ab1c5c1 (patch) | |
| tree | 2a3fc8350a590e7f342df328b7d9c4469ac40298 /source/slang/slang-emit-hlsl.cpp | |
| parent | 2275e18fc052239fe67f3fda68252ad92bb83ca9 (diff) | |
Support the new CoopVec builtins (#7108)
**NOTE: This is a breaking change for users who were using POC variant of DXC.
In order to keep the compatibility, the users will have to use -capability hlsl_coopvec_poc to their command line.
This PR adds a new capability "hlsl_coopvec_poc".
When it is used, the HLSL for CoopVec will be emitted for the POC variant of DXC.
When it is not used, the HLSL for CoopVec will be emitted for the DXC that officially supports the cooperative vector.
Diffstat (limited to 'source/slang/slang-emit-hlsl.cpp')
| -rw-r--r-- | source/slang/slang-emit-hlsl.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/slang/slang-emit-hlsl.cpp b/source/slang/slang-emit-hlsl.cpp index 3813cf9cb..ba167676a 100644 --- a/source/slang/slang-emit-hlsl.cpp +++ b/source/slang/slang-emit-hlsl.cpp @@ -1153,7 +1153,7 @@ void HLSLSourceEmitter::emitVectorTypeNameImpl(IRType* elementType, IRIntegerVal // although we should not expect to run into types that don't // have a sugared form. // - m_writer->emit("vector<"); + m_writer->emit(isCoopvecPoc ? "CoopVector<" : "vector<"); emitType(elementType); m_writer->emit(","); m_writer->emit(elementCount); @@ -1446,7 +1446,7 @@ void HLSLSourceEmitter::emitSimpleTypeImpl(IRType* type) case kIROp_CoopVectorType: { auto coopVecType = (IRCoopVectorType*)type; - m_writer->emit("CoopVector<"); + m_writer->emit(isCoopvecPoc ? "CoopVector<" : "vector<"); emitType(coopVecType->getElementType()); m_writer->emit(","); m_writer->emit(getIntVal(coopVecType->getElementCount())); |
