diff --git a/docs/command-line-slangc-reference.md b/docs/command-line-slangc-reference.md index 9f52954701e..f296a6f02c1 100644 --- a/docs/command-line-slangc-reference.md +++ b/docs/command-line-slangc-reference.md @@ -1075,6 +1075,7 @@ A capability describes an optional feature that a target may or may not support. * `metallib_3_1` * `hlsl_nvapi` * `hlsl_2018` +* `hlsl_coopvec_poc` * `vertex` * `fragment` * `compute` diff --git a/docs/user-guide/a3-02-reference-capability-atoms.md b/docs/user-guide/a3-02-reference-capability-atoms.md index 12cda6bed32..11670111956 100644 --- a/docs/user-guide/a3-02-reference-capability-atoms.md +++ b/docs/user-guide/a3-02-reference-capability-atoms.md @@ -7,12 +7,12 @@ Capability Atoms ### Sections: -1. [Targets](#Targets) -2. [Stages](#Stages) -3. [Versions](#Versions) -4. [Extensions](#Extensions) -5. [Compound Capabilities](#Compound-Capabilities) -6. [Other](#Other) +1. [Targets](#targets) +2. [Stages](#stages) +3. [Versions](#versions) +4. [Extensions](#extensions) +5. [Compound Capabilities](#compound-capabilities) +6. [Other](#other) Targets ---------------------- @@ -155,6 +155,9 @@ Versions `hlsl_2018` > Represet HLSL compatibility support. +`hlsl_coopvec_poc` +> Represet compatibility support for the deprecated POC DXC + `dxil_lib` > Represents capabilities required for DXIL Library compilation. diff --git a/source/slang/hlsl.meta.slang b/source/slang/hlsl.meta.slang index 34423d4f34f..2382d4a9ac3 100644 --- a/source/slang/hlsl.meta.slang +++ b/source/slang/hlsl.meta.slang @@ -23068,6 +23068,7 @@ struct CoopVec : IArray, IArithmeti [ForceInline] [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] __init() { this = CoopVec(T(0)); @@ -23075,6 +23076,7 @@ struct CoopVec : IArray, IArithmeti [ForceInline] [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] __init(T t) { this.fill(t); @@ -23082,6 +23084,7 @@ struct CoopVec : IArray, IArithmeti [ForceInline] [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] __init(CoopVec other) { this.copyFrom(other); @@ -23097,6 +23100,8 @@ struct CoopVec : IArray, IArithmeti [OverloadRank(-10)] [ForceInline] + [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] __init(int i) { this = CoopVec(T(i)); @@ -23115,14 +23120,18 @@ struct CoopVec : IArray, IArithmeti /// Copy values from another CoopVec instance into this one. The source CoopVec can have a different element type, /// in which case appropriate type conversion will be performed. /// @param other The source CoopVec to copy from. - [require(hlsl)] [mutating] [ForceInline] + [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] void copyFrom(CoopVec other) { __target_switch { - case hlsl: __intrinsic_asm ".CopyFrom"; + case hlsl: + __intrinsic_asm "$0 = $1"; + case hlsl_coopvec_poc: + __intrinsic_asm ".CopyFrom"; default: if (__isFloat() && __isInt()) this = __int_to_float_cast(other); @@ -23137,9 +23146,9 @@ struct CoopVec : IArray, IArithmeti /// Fill all elements of this CoopVec with the specified value. /// @param t The value to fill all elements with. - [require(cooperative_vector)] [mutating] - [ForceInline] + [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] void fill(T t) { __target_switch @@ -23151,10 +23160,15 @@ struct CoopVec : IArray, IArithmeti result:$$CoopVec = OpCompositeConstructReplicateEXT $t; }; case hlsl: - case hlsl: __intrinsic_asm ".Fill"; + for(int i = 0; i < N; ++i) + this[i] = t; + return; + case hlsl_coopvec_poc: + __intrinsic_asm ".Fill"; default: for(int i = 0; i < N; ++i) this[i] = t; + return; } } @@ -23165,8 +23179,8 @@ struct CoopVec : IArray, IArithmeti /// Store all elements of this CoopVec into a buffer at a specified offset. /// @param buffer The destination buffer to store the values into. /// @param byteOffset16ByteAligned The byte offset from the start of the buffer where the data will be stored. Must be 16-byte aligned. - [ForceInline] [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] void store(RWByteAddressBuffer buffer, int32_t byteOffset16ByteAligned = 0) { __target_switch @@ -23178,17 +23192,19 @@ struct CoopVec : IArray, IArithmeti // TODO: Should this be a byte offset OpCooperativeVectorStoreNV $ptr $byteOffset16ByteAligned $this None; }; -#ifdef NOT_SUPPORTED_YET case hlsl: - this.__Store(buffer, byteOffset16ByteAligned); -#endif + __intrinsic_asm "$1.Store< vector<$[0], $[1]> >($2, $0)", T, N; + case hlsl_coopvec_poc: + for(int i = 0; i < N; ++i) + buffer.StoreByteOffset(byteOffset16ByteAligned + __elemToByteOffset(i), this[i]); + return; default: for(int i = 0; i < N; ++i) buffer.StoreByteOffset(byteOffset16ByteAligned + __elemToByteOffset(i), this[i]); + return; } } - [ForceInline] [require(cooperative_vector)] void store(RWStructuredBuffer buffer, int32_t byteOffset16ByteAligned = 0) { @@ -23201,10 +23217,6 @@ struct CoopVec : IArray, IArithmeti // TODO: Should this be a byte offset OpCooperativeVectorStoreNV $ptr $byteOffset16ByteAligned $this None; }; -#ifdef NOT_SUPPORTED_YET - case hlsl: - this.__Store(buffer, byteOffset16ByteAligned); -#endif default: for(int i = 0; i < N; ++i) buffer[i + __byteToElemOffset(byteOffset16ByteAligned)] = this[i]; @@ -23213,19 +23225,23 @@ struct CoopVec : IArray, IArithmeti [ForceInline] [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] void store(__ref groupshared T[M] data, int32_t byteOffset16ByteAligned = 0) { + static_assert(N <= M, "The destination vector size is smaller than the input."); __target_switch { case spirv: spirv_asm{ OpCooperativeVectorStoreNV &data $byteOffset16ByteAligned $this None; }; - case hlsl: + case hlsl_coopvec_poc: this.__Store(data, __byteToElemOffset(byteOffset16ByteAligned)); + return; default: for(int i = 0; i < N; ++i) data[i + __byteToElemOffset(byteOffset16ByteAligned)] = this[i]; + return; } } @@ -23236,6 +23252,7 @@ struct CoopVec : IArray, IArithmeti [require(spirv, cooperative_vector)] void storeAny(__ref groupshared U[M] data, int32_t byteOffset16ByteAligned = 0) { + static_assert(N <= M, "The destination vector size is smaller than the input."); __target_switch { case spirv: @@ -23262,9 +23279,9 @@ struct CoopVec : IArray, IArithmeti /// @param buffer The source buffer to load data from. /// @param byteOffset16ByteAligned The byte offset from the start of the buffer. Must be 16-byte aligned. /// @return A new cooperative vector containing the loaded values. - [ForceInline] [__NoSideEffect] [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] static CoopVec load(ByteAddressBuffer buffer, int32_t byteOffset16ByteAligned = 0) { __target_switch @@ -23276,6 +23293,7 @@ struct CoopVec : IArray, IArithmeti result:$$CoopVec = OpCooperativeVectorLoadNV $ptr $byteOffset16ByteAligned None; }; case hlsl: + case hlsl_coopvec_poc: CoopVec ret; ret.__Load(buffer, byteOffset16ByteAligned); return ret; @@ -23288,9 +23306,9 @@ struct CoopVec : IArray, IArithmeti return CoopVec(); } - [ForceInline] [__NoSideEffect] [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] static CoopVec load(RWByteAddressBuffer buffer, int32_t byteOffset16ByteAligned = 0) { __target_switch @@ -23302,6 +23320,7 @@ struct CoopVec : IArray, IArithmeti result:$$CoopVec = OpCooperativeVectorLoadNV $ptr $byteOffset16ByteAligned None; }; case hlsl: + case hlsl_coopvec_poc: CoopVec ret; ret.__Load(buffer, byteOffset16ByteAligned); return ret; @@ -23314,9 +23333,9 @@ struct CoopVec : IArray, IArithmeti return CoopVec(); } - [ForceInline] [__NoSideEffect] [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] static CoopVec load(StructuredBuffer buffer, int32_t byteOffset16ByteAligned = 0) { __target_switch @@ -23327,12 +23346,6 @@ struct CoopVec : IArray, IArithmeti { result:$$CoopVec = OpCooperativeVectorLoadNV $ptr $byteOffset16ByteAligned None; }; -#ifdef NOT_SUPPORTED_YET - case hlsl: - CoopVec ret; - ret.__Load(buffer, byteOffset16ByteAligned); - return ret; -#endif default: var vec = CoopVec(); for(int i = 0; i < N; ++i) @@ -23342,7 +23355,6 @@ struct CoopVec : IArray, IArithmeti return CoopVec(); } - [ForceInline] [__NoSideEffect] [require(spirv, cooperative_vector)] static CoopVec load(RWStructuredBuffer buffer, int32_t byteOffset16ByteAligned = 0) @@ -23355,12 +23367,6 @@ struct CoopVec : IArray, IArithmeti { result:$$CoopVec = OpCooperativeVectorLoadNV $ptr $byteOffset16ByteAligned None; }; -#ifdef NOT_SUPPORTED_YET - case hlsl: - CoopVec ret; - ret.__Load(buffer, byteOffset16ByteAligned); - return ret; -#endif default: var vec = CoopVec(); for(int i = 0; i < N; ++i) @@ -23373,8 +23379,10 @@ struct CoopVec : IArray, IArithmeti [ForceInline] [__NoSideEffect] [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] static CoopVec load(__constref groupshared const T[M] data, int32_t byteOffset16ByteAligned = 0) { + static_assert(N <= M, "The destination vector size is smaller than the input."); __target_switch { case spirv: @@ -23382,6 +23390,7 @@ struct CoopVec : IArray, IArithmeti result:$$CoopVec = OpCooperativeVectorLoadNV &data $byteOffset16ByteAligned None }; case hlsl: + case hlsl_coopvec_poc: CoopVec ret; ret.__Load(data, __byteToElemOffset(byteOffset16ByteAligned)); return ret; @@ -23403,6 +23412,7 @@ struct CoopVec : IArray, IArithmeti [require(spirv, cooperative_vector)] static CoopVec loadAny(__constref groupshared const U[M] data, int32_t byteOffset16ByteAligned = 0) { + static_assert(N <= M, "The destination vector size is smaller than the input."); __target_switch { case spirv: @@ -23452,22 +23462,28 @@ struct CoopVec : IArray, IArithmeti [ForceInline] [__NoSideEffect] [nonmutating] + [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] get { __target_switch { - case hlsl: __intrinsic_asm ".ReadFromIndex"; + case hlsl_coopvec_poc: + __intrinsic_asm ".ReadFromIndex"; default: return __indexRead(index); } } [ForceInline] [mutating] + [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] set { __target_switch { - case hlsl: __intrinsic_asm ".WriteToIndex"; + case hlsl_coopvec_poc: + __intrinsic_asm ".WriteToIndex"; default: __indexRef(index) = newValue; } } @@ -23483,6 +23499,8 @@ struct CoopVec : IArray, IArithmeti /// Creates a new cooperative vector with all elements initialized to the specified scalar value. /// @param t The scalar value to replicate across all elements. /// @return A new cooperative vector where each element equals the input value. + [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] static CoopVec replicate(T t) { CoopVec ret; @@ -23561,12 +23579,17 @@ struct CoopVec : IArray, IArithmeti This __pureAdd(This other); [mutating] + [ForceInline] [require(hlsl)] + [require(hlsl_coopvec_poc)] void __mutAdd(This other) { __target_switch { - case hlsl: __intrinsic_asm ".Add"; + case hlsl: + __intrinsic_asm "$0 += $1"; + case hlsl_coopvec_poc: + __intrinsic_asm ".Add"; } } @@ -23575,11 +23598,15 @@ struct CoopVec : IArray, IArithmeti /// @return A new cooperative vector containing the sum of the two vectors. // TODO: Why is this ForceInline necessary for hlsl, dxc bug? [ForceInline] + [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] This add(This other) { __target_switch { case hlsl: + __intrinsic_asm "$0 + $1"; + case hlsl_coopvec_poc: This ret = this; ret.__mutAdd(other); return ret; @@ -23592,18 +23619,29 @@ struct CoopVec : IArray, IArithmeti [mutating] [require(hlsl)] + [require(hlsl_coopvec_poc)] void __mutSub(This other) - { __target_switch { case hlsl: __intrinsic_asm ".Subtract"; } } + { + __target_switch + { + case hlsl: __intrinsic_asm "$0 -= $1"; + case hlsl_coopvec_poc: __intrinsic_asm ".Subtract"; + } + } /// Performs component-wise subtraction with another cooperative vector. /// @param other The cooperative vector to subtract from this vector. /// @return A new cooperative vector containing the difference of the two vectors. [ForceInline] + [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] This sub(This other) { __target_switch { case hlsl: + __intrinsic_asm "$0 - $1"; + case hlsl_coopvec_poc: This ret = this; ret.__mutSub(other); return ret; @@ -23616,18 +23654,29 @@ struct CoopVec : IArray, IArithmeti [mutating] [require(hlsl)] + [require(hlsl_coopvec_poc)] void __mutMul(This other) - { __target_switch { case hlsl: __intrinsic_asm ".Multiply"; } } + { + __target_switch + { + case hlsl: __intrinsic_asm "$0 *= $1"; + case hlsl_coopvec_poc: __intrinsic_asm ".Multiply"; + } + } /// Performs component-wise multiplication with another cooperative vector. /// @param other The cooperative vector to multiply with this vector. /// @return A new cooperative vector containing the product of the two vectors. [ForceInline] + [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] This mul(This other) { __target_switch { case hlsl: + __intrinsic_asm "$0 * $1"; + case hlsl_coopvec_poc: This ret = this; ret.__mutMul(other); return ret; @@ -23640,18 +23689,29 @@ struct CoopVec : IArray, IArithmeti [mutating] [require(hlsl)] + [require(hlsl_coopvec_poc)] void __mutDiv(This other) - { __target_switch { case hlsl: __intrinsic_asm ".Divide"; } } + { + __target_switch + { + case hlsl: __intrinsic_asm "$0 /= $1"; + case hlsl_coopvec_poc: __intrinsic_asm ".Divide"; + } + } /// Performs component-wise division with another cooperative vector. /// @param other The cooperative vector to divide this vector by. /// @return A new cooperative vector containing the quotient of the two vectors. [ForceInline] + [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] This div(This other) { __target_switch { case hlsl: + __intrinsic_asm "$0 / $1"; + case hlsl_coopvec_poc: This ret = this; ret.__mutDiv(other); return ret; @@ -23661,18 +23721,29 @@ struct CoopVec : IArray, IArithmeti [mutating] [require(hlsl)] + [require(hlsl_coopvec_poc)] void __mutMod(This other) - { __target_switch { case hlsl: __intrinsic_asm ".Mod"; } } + { + __target_switch + { + case hlsl: __intrinsic_asm "$0 %= %1"; + case hlsl_coopvec_poc: __intrinsic_asm ".Mod"; + } + } /// Performs component-wise remainder operation between two cooperative vectors. /// @param other The cooperative vector to compute the remainder with. /// @return A new cooperative vector containing the remainder of the division between corresponding components. [ForceInline] + [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] This mod(This other) { __target_switch { case hlsl: + __intrinsic_asm "$0 % $1"; + case hlsl_coopvec_poc: This ret = this; ret.__mutMod(other); return ret; @@ -23690,11 +23761,15 @@ struct CoopVec : IArray, IArithmeti /// Returns a new cooperative vector where each component has its sign negated. /// @return A new cooperative vector containing the negated values. //[ForceInline] + [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] This neg() { __target_switch { case hlsl: + __intrinsic_asm "-$0"; + case hlsl_coopvec_poc: This ret = this; for(int i = 0; i < N; ++i) ret[i] = -this[i]; @@ -23705,54 +23780,130 @@ struct CoopVec : IArray, IArithmeti [mutating] [require(hlsl)] + [require(hlsl_coopvec_poc)] void __mutScalarMul(T t) - { __target_switch { case hlsl: __intrinsic_asm ".ScalarMultiply"; } } + { + __target_switch + { + case hlsl: __intrinsic_asm "$0 *= $1"; + case hlsl_coopvec_poc: __intrinsic_asm ".ScalarMultiply"; + } + } [mutating] [require(hlsl)] + [require(hlsl_coopvec_poc)] void __mutMin(This other) - { __target_switch { case hlsl: __intrinsic_asm ".Min"; } } + { + __target_switch + { + case hlsl: static_assert(false, "Not supported"); + case hlsl_coopvec_poc: __intrinsic_asm ".Min"; + } + } [mutating] [require(hlsl)] + [require(hlsl_coopvec_poc)] void __mutMax(This other) - { __target_switch { case hlsl: __intrinsic_asm ".Max"; } } + { + __target_switch + { + case hlsl: static_assert(false, "Not supported"); + case hlsl_coopvec_poc: __intrinsic_asm ".Max"; + } + } [mutating] [require(hlsl)] + [require(hlsl_coopvec_poc)] void __mutClamp(This minVal, This maxVal) - { __target_switch { case hlsl: __intrinsic_asm ".Clamp"; } } + { + __target_switch + { + case hlsl: static_assert(false, "Not supported"); + case hlsl_coopvec_poc: __intrinsic_asm ".Clamp"; + } + } // // Internal utilities for loading and storing // [mutating] + [ForceInline] [require(hlsl, byteaddressbuffer)] + [require(hlsl_coopvec_poc, byteaddressbuffer)] void __Load(const ByteAddressBuffer buffer, uint byteOffset, uint alignment = 0) - { __target_switch { case hlsl: __intrinsic_asm ".Load"; } } + { + __target_switch + { + case hlsl: + __intrinsic_asm "$0 = $1.Load< vector<$[0], $[1]> >($2)", T, N; + case hlsl_coopvec_poc: + __intrinsic_asm ".Load"; + } + } [mutating] + [ForceInline] [require(hlsl, byteaddressbuffer_rw)] + [require(hlsl_coopvec_poc, byteaddressbuffer_rw)] void __Load(const RWByteAddressBuffer buffer, uint byteOffset, uint alignment = 0) - { __target_switch { case hlsl: __intrinsic_asm ".Load"; } } + { + __target_switch + { + case hlsl: + __intrinsic_asm "$0 = $1.Load< vector<$[0], $[1]> >($2)", T, N; + case hlsl_coopvec_poc: + __intrinsic_asm ".Load"; + } + } __generic [mutating] // Careful, this takes the offset in elements + [ForceInline] [require(hlsl)] + [require(hlsl_coopvec_poc)] void __Load(__constref groupshared T buffer[M], uint elemOffset) - { __target_switch { case hlsl: __intrinsic_asm ".Load"; } } + { + static_assert(N <= M, "The given groupshared array is smaller than the given CoopVec"); + __target_switch + { + case hlsl: + [ForceUnroll] + for(int i = 0; i < N; ++i) + this[i] = buffer[i + elemOffset]; + return; + case hlsl_coopvec_poc: + __intrinsic_asm ".Load"; + } + } [require(hlsl, byteaddressbuffer_rw)] + [require(hlsl_coopvec_poc, byteaddressbuffer_rw)] void __Store(RWByteAddressBuffer buffer, uint byteOffset, uint alignment = 0) - { __target_switch { case hlsl: __intrinsic_asm ".Store"; } } + { + __target_switch + { + case hlsl: static_assert(false, "Not supported"); + case hlsl_coopvec_poc: __intrinsic_asm ".Store"; + } + } __generic [require(hlsl)] + [require(hlsl_coopvec_poc)] // Careful, this takes the offset in elements void __Store(__ref groupshared T buffer[M], uint elemOffset) - { __target_switch { case hlsl: __intrinsic_asm ".Store"; } } + { + __target_switch + { + case hlsl: static_assert(false, "Not supported"); + case hlsl_coopvec_poc: __intrinsic_asm ".Store"; + } + } ${{{{ static const struct { @@ -23766,7 +23917,9 @@ static const struct { for(auto buffer : kByteAddressBufferCases) { }}}} [mutating] + [ForceInline] [require(hlsl, byteaddressbuffer_rw)] + [require(hlsl_coopvec_poc, byteaddressbuffer_rw)] void __mutMatMul( CoopVec input, uint inputInterpretationHLSL, $(buffer.type) matrix, uint matrixOffset, uint matrixInterpretationHLSL, @@ -23774,12 +23927,30 @@ for(auto buffer : kByteAddressBufferCases) { { __target_switch { - case hlsl: __intrinsic_asm ".MatMul"; + case hlsl: + if (T is __BuiltinSignedArithmeticType) + { + if (U is __BuiltinSignedArithmeticType) + __intrinsic_asm "__builtin_MatVecMul($0, false, $1, false, $2, $3, $4, $5, $6, $7, $8, $9, $10)"; + else + __intrinsic_asm "__builtin_MatVecMul($0, false, $1, true, $2, $3, $4, $5, $6, $7, $8, $9, $10)"; + } + else + { + if (U is __BuiltinSignedArithmeticType) + __intrinsic_asm "__builtin_MatVecMul($0, true, $1, false, $2, $3, $4, $5, $6, $7, $8, $9, $10)"; + else + __intrinsic_asm "__builtin_MatVecMul($0, true, $1, true, $2, $3, $4, $5, $6, $7, $8, $9, $10)"; + } + case hlsl_coopvec_poc: + __intrinsic_asm ".MatMul"; } } [mutating] + [ForceInline] [require(hlsl, byteaddressbuffer_rw)] + [require(hlsl_coopvec_poc, byteaddressbuffer_rw)] void __mutMatMulAdd( CoopVec input, uint inputInterpretationHLSL, $(buffer.type) matrix, uint matrixOffset, uint matrixInterpretationHLSL, @@ -23788,7 +23959,23 @@ for(auto buffer : kByteAddressBufferCases) { { __target_switch { - case hlsl: __intrinsic_asm ".MatMulAdd"; + case hlsl: + if (T is __BuiltinSignedArithmeticType) + { + if (U is __BuiltinSignedArithmeticType) + __intrinsic_asm "__builtin_MatVecMulAdd($0, false, $1, false, $2, $3, $4, $5, $9, $10, $11, $12, $13, $6, $7, $8)"; + else + __intrinsic_asm "__builtin_MatVecMulAdd($0, false, $1, true, $2, $3, $4, $5, $9, $10, $11, $12, $13, $6, $7, $8)"; + } + else + { + if (U is __BuiltinSignedArithmeticType) + __intrinsic_asm "__builtin_MatVecMulAdd($0, true, $1, false, $2, $3, $4, $5, $9, $10, $11, $12, $13, $6, $7, $8)"; + else + __intrinsic_asm "__builtin_MatVecMulAdd($0, true, $1, true, $2, $3, $4, $5, $9, $10, $11, $12, $13, $6, $7, $8)"; + } + case hlsl_coopvec_poc: + __intrinsic_asm ".MatMulAdd"; } } @@ -23806,7 +23993,8 @@ for(auto buffer : kByteAddressBufferCases) { /// can be packed into each element of the input vector. The k parameter specifies the actual number of /// values to use from the packed input. [mutating] - [ForceInline] + [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] void matMulAccumPacked( CoopVec input, constexpr CoopVecComponentType inputInterpretation, @@ -23870,6 +24058,8 @@ for(auto buffer : kByteAddressBufferCases) { /// @param matrixStride The stride in bytes between rows/columns of the matrix. [mutating] [ForceInline] + [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] void matMulAccum( CoopVec input, constexpr CoopVecComponentType inputInterpretation, @@ -23897,7 +24087,8 @@ for(auto buffer : kByteAddressBufferCases) { } [mutating] - [ForceInline] + [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] void matMulAddAccumPacked( CoopVec input, constexpr CoopVecComponentType inputInterpretation, @@ -23976,6 +24167,8 @@ for(auto buffer : kByteAddressBufferCases) { /// while matMulAddAccumPacked allows k to be specified independently for packed interpretations. [mutating] [ForceInline] + [require(cooperative_vector)] + [require(hlsl_coopvec_poc)] void matMulAddAccum( CoopVec input, constexpr CoopVecComponentType inputInterpretation, @@ -24008,6 +24201,24 @@ for(auto buffer : kByteAddressBufferCases) { ); } + [ForceInline] + [require(hlsl, byteaddressbuffer_rw)] + void __OuterProductAccumulate( + CoopVec b, + $(buffer.type) matrix, + int32_t matrixOffset, + uint matrixStride, + uint memoryLayout, + uint matrixInterpretation, + ) + { + __target_switch + { + case hlsl: + __intrinsic_asm "__builtin_OuterProductAccumulate($0, $1, $2, $3, $6, $5, $4)"; + } + } + ${{{{ } @@ -24040,6 +24251,7 @@ CoopVec __float_to_int_cast(CoopVec val); __generic [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] CoopVec operator *(CoopVec lhs, const T rhs) { __target_switch @@ -24061,6 +24273,8 @@ CoopVec operator *(CoopVec lhs, const T rhs) return lhs; } case hlsl: + __intrinsic_asm "$0 * $1"; + case hlsl_coopvec_poc: CoopVec ret = lhs; ret.__mutScalarMul(rhs); return ret; @@ -24076,6 +24290,7 @@ CoopVec operator *(CoopVec lhs, const T rhs) __generic [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] CoopVec operator *(const T lhs, CoopVec rhs) { return rhs * lhs; @@ -24083,6 +24298,7 @@ CoopVec operator *(const T lhs, CoopVec rhs) [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] CoopVec min(CoopVec x, CoopVec y) { __target_switch @@ -24093,6 +24309,8 @@ CoopVec min(CoopVec x, result:$$CoopVec = OpExtInst glsl450 FMin $x $y; }; case hlsl: + __intrinsic_asm "min($0, $1)"; + case hlsl_coopvec_poc: CoopVec ret = x; ret.__mutMin(y); return ret; @@ -24107,6 +24325,7 @@ CoopVec min(CoopVec x, [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] CoopVec max(CoopVec x, CoopVec y) { __target_switch @@ -24117,6 +24336,8 @@ CoopVec max(CoopVec x, result:$$CoopVec = OpExtInst glsl450 FMax $x $y; }; case hlsl: + __intrinsic_asm "max($0, $1)"; + case hlsl_coopvec_poc: CoopVec ret = x; ret.__mutMax(y); return ret; @@ -24130,6 +24351,7 @@ CoopVec max(CoopVec x, [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] CoopVec clamp(CoopVec x, CoopVec minVal, CoopVec maxVal) { __target_switch @@ -24140,6 +24362,8 @@ CoopVec clamp(CoopVec x result:$$CoopVec = OpExtInst glsl450 FClamp $x $minVal $maxVal; }; case hlsl: + __intrinsic_asm "clamp($0, $1, $2)"; + case hlsl_coopvec_poc: CoopVec ret = x; ret.__mutClamp(minVal, maxVal); return ret; @@ -24153,6 +24377,7 @@ CoopVec clamp(CoopVec x [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] CoopVec min(CoopVec x, CoopVec y) { __target_switch @@ -24173,6 +24398,8 @@ CoopVec min(CoopVec x, CoopVe }; } case hlsl: + __intrinsic_asm "min($0, $1)"; + case hlsl_coopvec_poc: CoopVec ret = x; ret.__mutMin(y); return ret; @@ -24187,6 +24414,7 @@ CoopVec min(CoopVec x, CoopVe // [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] CoopVec max(CoopVec x, CoopVec y) { __target_switch @@ -24207,6 +24435,8 @@ CoopVec max(CoopVec x, CoopVe }; } case hlsl: + __intrinsic_asm "max($0, $1)"; + case hlsl_coopvec_poc: CoopVec ret = x; ret.__mutMax(y); return ret; @@ -24220,6 +24450,7 @@ CoopVec max(CoopVec x, CoopVe // [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] CoopVec clamp(CoopVec x, CoopVec minVal, CoopVec maxVal) { __target_switch @@ -24240,6 +24471,8 @@ CoopVec clamp(CoopVec x, Coop }; } case hlsl: + __intrinsic_asm "clamp($0, $1, $2)"; + case hlsl_coopvec_poc: CoopVec ret = x; ret.__mutClamp(minVal, maxVal); return ret; @@ -24253,10 +24486,18 @@ CoopVec clamp(CoopVec x, Coop // [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] CoopVec step(CoopVec edge, CoopVec x) { __target_switch { + case hlsl: + __intrinsic_asm "step($0, $1)"; + case hlsl_coopvec_poc: + CoopVec ret; + for(int i = 0; i < N; ++i) + ret[i] = step(edge[i], x[i]); + return ret; case spirv: return spirv_asm { @@ -24272,10 +24513,18 @@ CoopVec step(CoopVec ed // [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] CoopVec exp(CoopVec x) { __target_switch { + case hlsl: + __intrinsic_asm "exp($0)"; + case hlsl_coopvec_poc: + CoopVec ret; + for(int i = 0; i < N; ++i) + ret[i] = exp(x[i]); + return ret; case spirv: return spirv_asm { @@ -24291,10 +24540,18 @@ CoopVec exp(CoopVec x) // [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] CoopVec log(CoopVec x) { __target_switch { + case hlsl: + __intrinsic_asm "log($0)"; + case hlsl_coopvec_poc: + CoopVec ret; + for(int i = 0; i < N; ++i) + ret[i] = log(x[i]); + return ret; case spirv: return spirv_asm { @@ -24310,10 +24567,18 @@ CoopVec log(CoopVec x) // [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] CoopVec tanh(CoopVec x) { __target_switch { + case hlsl: + __intrinsic_asm "tanh($0)"; + case hlsl_coopvec_poc: + CoopVec ret; + for(int i = 0; i < N; ++i) + ret[i] = tanh(x[i]); + return ret; case spirv: return spirv_asm { @@ -24327,14 +24592,20 @@ CoopVec tanh(CoopVec x) } } -// TODO: Why does this fail when inlined on HLSL, -// We generate some really weird code... // [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] CoopVec atan(CoopVec yOverX) { __target_switch { + case hlsl: + __intrinsic_asm "atan($0)"; + case hlsl_coopvec_poc: + CoopVec ret; + for(int i = 0; i < N; ++i) + ret[i] = atan(yOverX[i]); + return ret; case spirv: return spirv_asm { @@ -24350,6 +24621,7 @@ CoopVec atan(CoopVec yO // [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] CoopVec fma(CoopVec a, CoopVec b, CoopVec c) { // TODO: Investigate, why does this fail if it's not inlined @@ -24357,6 +24629,13 @@ CoopVec fma(CoopVec a, // dxc generated substantially different code __target_switch { + case hlsl: + __intrinsic_asm "mad($0, $1, $2)"; + case hlsl_coopvec_poc: + CoopVec ret; + for(int i = 0; i < N; ++i) + ret[i] = mad(a[i], b[i], c[i]); + return ret; case spirv: return spirv_asm { @@ -24612,36 +24891,77 @@ uint32_t __getSpvCoopVecComponentType(CoopVecComponentType componentType) [ForceInline] uint32_t __getHLSLCoopVecComponentType(CoopVecComponentType componentType) { - switch (componentType) + __target_switch { - case CoopVecComponentType::Float16: - return 0; - case CoopVecComponentType::Float32: - return 1; - case CoopVecComponentType::UnsignedInt8: - return 2; - case CoopVecComponentType::UnsignedInt16: - return 3; - case CoopVecComponentType::UnsignedInt32: - return 4; - case CoopVecComponentType::SignedInt8: - return 5; - case CoopVecComponentType::SignedInt16: - return 6; - case CoopVecComponentType::SignedInt32: - return 7; - case CoopVecComponentType::SignedInt8Packed: - return 8; - case CoopVecComponentType::UnsignedInt8Packed: - return 9; - case CoopVecComponentType::FloatE4M3: - return 10; - case CoopVecComponentType::FloatE5M2: - return 11; - default: - static_assert(false, "unsupported componentType value"); + case hlsl: + switch (componentType) + { + case CoopVecComponentType::SignedInt16: + return 2; + case CoopVecComponentType::UnsignedInt16: + return 3; + case CoopVecComponentType::SignedInt32: + return 4; + case CoopVecComponentType::UnsignedInt32: + return 5; + case CoopVecComponentType::SignedInt64: + return 6; + case CoopVecComponentType::UnsignedInt64: + return 7; + case CoopVecComponentType::Float16: + return 8; + case CoopVecComponentType::Float32: + return 9; + case CoopVecComponentType::Float64: + return 10; + case CoopVecComponentType::SignedInt8Packed: + return 17; + case CoopVecComponentType::UnsignedInt8Packed: + return 18; + case CoopVecComponentType::UnsignedInt8: + return 19; + case CoopVecComponentType::SignedInt8: + return 20; + case CoopVecComponentType::FloatE4M3: + return 21; + case CoopVecComponentType::FloatE5M2: + return 22; + default: + static_assert(false, "unsupported componentType value"); + } + return 0; // ComponentType::Invalid + case hlsl_coopvec_poc: + switch (componentType) + { + case CoopVecComponentType::Float16: + return 0; + case CoopVecComponentType::Float32: + return 1; + case CoopVecComponentType::UnsignedInt8: + return 2; + case CoopVecComponentType::UnsignedInt16: + return 3; + case CoopVecComponentType::UnsignedInt32: + return 4; + case CoopVecComponentType::SignedInt8: + return 5; + case CoopVecComponentType::SignedInt16: + return 6; + case CoopVecComponentType::SignedInt32: + return 7; + case CoopVecComponentType::SignedInt8Packed: + return 8; + case CoopVecComponentType::UnsignedInt8Packed: + return 9; + case CoopVecComponentType::FloatE4M3: + return 10; + case CoopVecComponentType::FloatE5M2: + return 11; + default: + static_assert(false, "unsupported componentType value"); + } + return 32; } - return 32; } [ForceInline] @@ -24711,6 +25031,7 @@ for(auto buffer : kByteAddressBufferCases_) { // need it [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] __generic CoopVec coopVecMatMulPacked( CoopVec input, @@ -24854,6 +25175,7 @@ CoopVec coopVecMatMulPacked( /// @return A new cooperative vector containing the result of the matrix multiplication. [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] __generic CoopVec coopVecMatMul( CoopVec input, @@ -24900,6 +25222,7 @@ CoopVec coopVecMatMul( /// values to use from the packed input. [ForceInline] [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] CoopVec coopVecMatMulAddPacked( CoopVec input, constexpr CoopVecComponentType inputInterpretation, @@ -25037,6 +25360,7 @@ CoopVec coopVecMatMulAddPacked CoopVec coopVecMatMulAdd( CoopVec input, @@ -25087,6 +25411,7 @@ if(buffer.isRW) /// @param memoryLayout Specifies the memory layout of the matrix (row-major or column-major). /// @param matrixInterpretation Specifies how to interpret the values in the matrix. [require(cooperative_vector)] +[require(hlsl_coopvec_poc)] void coopVecOuterProductAccumulate( CoopVec a, CoopVec b, @@ -25100,6 +25425,10 @@ void coopVecOuterProductAccumulate( CoopVec v, $(buffer.type) buffer, @@ -25181,6 +25511,8 @@ void coopVecReduceSumAccumulate( __target_switch { case hlsl: + __intrinsic_asm "__builtin_VectorAccumulate($0, $1, $2)"; + case hlsl_coopvec_poc: __intrinsic_asm "$0.ReduceSumAccumulate($1, $2)"; case spirv: let bufferPtr = buffer.GetBufferPointer(); diff --git a/source/slang/slang-capabilities.capdef b/source/slang/slang-capabilities.capdef index 9d1a11f071a..f509835aa93 100644 --- a/source/slang/slang-capabilities.capdef +++ b/source/slang/slang-capabilities.capdef @@ -224,6 +224,10 @@ def hlsl_nvapi : hlsl; /// [Version] def hlsl_2018 : _sm_5_1; +/// Represet compatibility support for the deprecated POC DXC +/// [Version] +def hlsl_coopvec_poc : _sm_6_8; + /// Represents capabilities required for DXIL Library compilation. /// [Version] alias dxil_lib = _sm_6_3; @@ -1118,7 +1122,7 @@ alias bufferreference_int64 = bufferreference + GL_EXT_shader_explicit_arithmeti /// Note that cpp and cuda are supported via a fallback non-cooperative implementation /// No HLSL shader model bound yet /// [Compound] -alias cooperative_vector = _sm_6_8 | cpp | _cuda_sm_9_0 | spvCooperativeVectorNV; +alias cooperative_vector = _sm_6_9 | cpp | _cuda_sm_9_0 | spvCooperativeVectorNV; /// Capabilities needed to train cooperative vectors /// [Compound] alias cooperative_vector_training = spvCooperativeVectorTrainingNV; diff --git a/source/slang/slang-emit-c-like.cpp b/source/slang/slang-emit-c-like.cpp index 56668d092f4..141a843f2f0 100644 --- a/source/slang/slang-emit-c-like.cpp +++ b/source/slang/slang-emit-c-like.cpp @@ -109,6 +109,9 @@ CLikeSourceEmitter::CLikeSourceEmitter(const Desc& desc) m_codeGenContext = desc.codeGenContext; m_entryPointStage = desc.entryPointStage; m_effectiveProfile = desc.effectiveProfile; + + auto targetCaps = getTargetReq()->getTargetCaps(); + isCoopvecPoc = targetCaps.implies(CapabilityAtom::hlsl_coopvec_poc); } SlangResult CLikeSourceEmitter::init() @@ -3118,18 +3121,32 @@ void CLikeSourceEmitter::_emitInst(IRInst* inst) case kIROp_MakeCoopVector: { emitType(coopVecType, getName(inst)); - m_writer->emit(";\n"); + m_writer->emit(isCoopvecPoc ? ";\n" : " = { "); auto elemCount = as(coopVecType->getOperand(1)); IRIntegerValue elemCountValue = elemCount->getValue(); - for (IRIntegerValue i = 0; i < elemCountValue; ++i) + if (isCoopvecPoc) { - m_writer->emit(getName(inst)); - m_writer->emit(".WriteToIndex("); - m_writer->emit(i); - m_writer->emit(", "); + for (IRIntegerValue i = 0; i < elemCountValue; ++i) + { + m_writer->emit(getName(inst)); + m_writer->emit(".WriteToIndex("); + m_writer->emit(i); + m_writer->emit(", "); + emitDereferenceOperand(inst->getOperand(i), getInfo(EmitOp::General)); + m_writer->emit(");\n"); + } + } + else + { + IRIntegerValue i = 0; + for (; i < elemCountValue - 1; ++i) + { + emitDereferenceOperand(inst->getOperand(i), getInfo(EmitOp::General)); + m_writer->emit(", "); + } emitDereferenceOperand(inst->getOperand(i), getInfo(EmitOp::General)); - m_writer->emit(");\n"); + m_writer->emit("};\n"); } return; } @@ -3138,7 +3155,7 @@ void CLikeSourceEmitter::_emitInst(IRInst* inst) m_writer->emit(";\n"); m_writer->emit(getName(inst)); - m_writer->emit(".CopyFrom("); + m_writer->emit(isCoopvecPoc ? ".CopyFrom(" : " = ("); emitCallExpr((IRCall*)inst, getInfo(EmitOp::General)); m_writer->emit(");\n"); return; @@ -3147,7 +3164,7 @@ void CLikeSourceEmitter::_emitInst(IRInst* inst) m_writer->emit(";\n"); m_writer->emit(getName(inst)); - m_writer->emit(".CopyFrom("); + m_writer->emit(isCoopvecPoc ? ".CopyFrom(" : " = ("); emitDereferenceOperand(inst->getOperand(0), getInfo(EmitOp::General)); m_writer->emit(");\n"); return; @@ -3409,10 +3426,21 @@ void CLikeSourceEmitter::_emitStoreImpl(IRStore* store) auto dstPtr = store->getPtr(); if (isPointerOfType(dstPtr->getDataType(), kIROp_CoopVectorType)) { - emitDereferenceOperand(dstPtr, getInfo(EmitOp::General)); - m_writer->emit(".CopyFrom("); - emitDereferenceOperand(srcVal, getInfo(EmitOp::General)); - m_writer->emit(");\n"); + if (isCoopvecPoc) + { + emitDereferenceOperand(dstPtr, getInfo(EmitOp::General)); + m_writer->emit(".CopyFrom("); + emitDereferenceOperand(srcVal, getInfo(EmitOp::General)); + m_writer->emit(");\n"); + } + else + { + auto prec = getInfo(EmitOp::Assign); + emitDereferenceOperand(dstPtr, leftSide(getInfo(EmitOp::General), prec)); + m_writer->emit(" = "); + emitOperand(srcVal, rightSide(prec, getInfo(EmitOp::General))); + m_writer->emit(";\n"); + } } else { @@ -4705,7 +4733,7 @@ void CLikeSourceEmitter::emitVar(IRVar* varDecl) { m_writer->emit(";\n"); m_writer->emit(getName(varDecl)); - m_writer->emit(".CopyFrom("); + m_writer->emit(isCoopvecPoc ? ".CopyFrom(" : " = ("); emitDereferenceOperand(store->getVal()->getOperand(0), getInfo(EmitOp::General)); m_writer->emit(")"); } @@ -4713,7 +4741,7 @@ void CLikeSourceEmitter::emitVar(IRVar* varDecl) { m_writer->emit(";\n"); m_writer->emit(getName(varDecl)); - m_writer->emit(".CopyFrom("); + m_writer->emit(isCoopvecPoc ? ".CopyFrom(" : " = ("); emitCallExpr((IRCall*)store->getVal(), getInfo(EmitOp::General)); m_writer->emit(")"); } @@ -4726,13 +4754,14 @@ void CLikeSourceEmitter::emitVar(IRVar* varDecl) { m_writer->emit(";\n"); m_writer->emit(getName(varDecl)); - m_writer->emit(".WriteToIndex("); + m_writer->emit(isCoopvecPoc ? ".WriteToIndex(" : "["); m_writer->emit(i); - m_writer->emit(", "); + m_writer->emit(isCoopvecPoc ? ", " : "] = "); emitDereferenceOperand( store->getVal()->getOperand(i), getInfo(EmitOp::General)); - m_writer->emit(")"); + if (isCoopvecPoc) + m_writer->emit(")"); } } else diff --git a/source/slang/slang-emit-c-like.h b/source/slang/slang-emit-c-like.h index 28dcdcc4d71..f38158c0a55 100644 --- a/source/slang/slang-emit-c-like.h +++ b/source/slang/slang-emit-c-like.h @@ -738,6 +738,9 @@ class CLikeSourceEmitter : public SourceEmitterBase OrderedHashSet m_requiredPreludes; Dictionary m_builtinPreludes; + + // Indicates if we are emiting for DXC cooperative vector POC. + bool isCoopvecPoc = false; }; } // namespace Slang diff --git a/source/slang/slang-emit-hlsl.cpp b/source/slang/slang-emit-hlsl.cpp index 3813cf9cb44..ba167676a28 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())); diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 67d13c34b9d..c7f6c920ce9 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -2347,7 +2347,16 @@ CapabilitySet TargetRequest::getTargetCaps() for (auto atomVal : optionSet.getArray(CompilerOptionName::Capability)) { - auto toAdd = CapabilitySet((CapabilityName)atomVal.intValue); + CapabilitySet toAdd; + switch (atomVal.kind) + { + case CompilerOptionValueKind::Int: + toAdd = CapabilitySet(CapabilityName(atomVal.intValue)); + break; + case CompilerOptionValueKind::String: + toAdd = CapabilitySet(findCapabilityName(atomVal.stringValue.getUnownedSlice())); + break; + } if (isGLSLTarget) targetCap.addSpirvVersionFromOtherAsGlslSpirvVersion(toAdd); diff --git a/tests/cooperative-vector/add.slang b/tests/cooperative-vector/add.slang index 7dd57ed9ca2..60968c9a6c3 100644 --- a/tests/cooperative-vector/add.slang +++ b/tests/cooperative-vector/add.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -use-dxil -output-using-type -profile cs_6_8 -dx12-experimental -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: int32_t @@ -7,21 +7,22 @@ // CHECK-NEXT: 3 // CHECK-NEXT: 5 // CHECK-NEXT: 7 +// CHECK-NEXT: 9 -//TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name=outputBuffer +//TEST_INPUT:ubuffer(data=[0 0 0 0 0], stride=4):out,name=outputBuffer RWStructuredBuffer outputBuffer; -//TEST_INPUT:ubuffer(data=[1 2 3 4], stride=4),name=input1 +//TEST_INPUT:ubuffer(data=[1 2 3 4 5], stride=4),name=input1 ByteAddressBuffer input1; -//TEST_INPUT:ubuffer(data=[0 1 2 3], stride=4),name=input2 +//TEST_INPUT:ubuffer(data=[0 1 2 3 4], stride=4),name=input2 ByteAddressBuffer input2; [numthreads(1, 1, 1)] void computeMain() { - CoopVec vec1 = coopVecLoad<4, int32_t>(input1); - CoopVec vec2 = coopVecLoad<4, int32_t>(input2); + CoopVec vec1 = coopVecLoad<5, int32_t>(input1); + CoopVec vec2 = coopVecLoad<5, int32_t>(input2); let result = vec1 + vec2; diff --git a/tests/cooperative-vector/atan.slang b/tests/cooperative-vector/atan.slang index a7a292d6a2c..4ae135dcdbb 100644 --- a/tests/cooperative-vector/atan.slang +++ b/tests/cooperative-vector/atan.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: float diff --git a/tests/cooperative-vector/clamp.slang b/tests/cooperative-vector/clamp.slang index 37f3a69a8e8..1250aaae03d 100644 --- a/tests/cooperative-vector/clamp.slang +++ b/tests/cooperative-vector/clamp.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: float diff --git a/tests/cooperative-vector/comparison.slang b/tests/cooperative-vector/comparison.slang index 99a08ae492d..2b5ef30de70 100644 --- a/tests/cooperative-vector/comparison.slang +++ b/tests/cooperative-vector/comparison.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: uint32_t diff --git a/tests/cooperative-vector/conversion.slang b/tests/cooperative-vector/conversion.slang index 7f6a242d7c4..5bba7961b56 100644 --- a/tests/cooperative-vector/conversion.slang +++ b/tests/cooperative-vector/conversion.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: float diff --git a/tests/cooperative-vector/copyFrom.slang b/tests/cooperative-vector/copyFrom.slang index bd85800ced0..dcdc5cad0e5 100644 --- a/tests/cooperative-vector/copyFrom.slang +++ b/tests/cooperative-vector/copyFrom.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -emit-spirv-directly -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: int32_t diff --git a/tests/cooperative-vector/div.slang b/tests/cooperative-vector/div.slang index 49cb9a036cd..a3aee5afecd 100644 --- a/tests/cooperative-vector/div.slang +++ b/tests/cooperative-vector/div.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: int32_t diff --git a/tests/cooperative-vector/exp.slang b/tests/cooperative-vector/exp.slang index 9126abea38d..82c43c900c5 100644 --- a/tests/cooperative-vector/exp.slang +++ b/tests/cooperative-vector/exp.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: float diff --git a/tests/cooperative-vector/fill.slang b/tests/cooperative-vector/fill.slang index ac50688660b..6074c1d4752 100644 --- a/tests/cooperative-vector/fill.slang +++ b/tests/cooperative-vector/fill.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -emit-spirv-directly -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: int32_t diff --git a/tests/cooperative-vector/fma.slang b/tests/cooperative-vector/fma.slang index 8872044d8be..9f0e194aa47 100644 --- a/tests/cooperative-vector/fma.slang +++ b/tests/cooperative-vector/fma.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: float diff --git a/tests/cooperative-vector/load-store-groupshared.slang b/tests/cooperative-vector/load-store-groupshared.slang index 281a7b6a9b7..20b064ac4e2 100644 --- a/tests/cooperative-vector/load-store-groupshared.slang +++ b/tests/cooperative-vector/load-store-groupshared.slang @@ -1,5 +1,5 @@ //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: 1 diff --git a/tests/cooperative-vector/load-store-rwbyteaddressbuffer.slang b/tests/cooperative-vector/load-store-rwbyteaddressbuffer.slang index 7b88c0ee3bf..0bd698b7f98 100644 --- a/tests/cooperative-vector/load-store-rwbyteaddressbuffer.slang +++ b/tests/cooperative-vector/load-store-rwbyteaddressbuffer.slang @@ -1,5 +1,5 @@ //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu // CHECK: 1 diff --git a/tests/cooperative-vector/load-store-rwstructuredbuffer.slang b/tests/cooperative-vector/load-store-rwstructuredbuffer.slang index 7e050db80b1..5f602d1a0c0 100644 --- a/tests/cooperative-vector/load-store-rwstructuredbuffer.slang +++ b/tests/cooperative-vector/load-store-rwstructuredbuffer.slang @@ -2,7 +2,7 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // HLSL doesn't support structured buffers for CoopVec -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: int32_t // CHECK-NEXT: 5 diff --git a/tests/cooperative-vector/log.slang b/tests/cooperative-vector/log.slang index b051f2f87f3..3e5cd32cff5 100644 --- a/tests/cooperative-vector/log.slang +++ b/tests/cooperative-vector/log.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: float diff --git a/tests/cooperative-vector/matrix-mul-bias-mut.slang b/tests/cooperative-vector/matrix-mul-bias-mut.slang index 1b1061abdd5..2c547987b7a 100644 --- a/tests/cooperative-vector/matrix-mul-bias-mut.slang +++ b/tests/cooperative-vector/matrix-mul-bias-mut.slang @@ -2,7 +2,7 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // Disabled because HLSL doesn't support int8 -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: int32_t // CHECK-NEXT: 8035 diff --git a/tests/cooperative-vector/matrix-mul-bias-packed-mut.slang b/tests/cooperative-vector/matrix-mul-bias-packed-mut.slang index 2f3dbfeca1f..29038c83daf 100644 --- a/tests/cooperative-vector/matrix-mul-bias-packed-mut.slang +++ b/tests/cooperative-vector/matrix-mul-bias-packed-mut.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: int32_t diff --git a/tests/cooperative-vector/matrix-mul-bias-packed.slang b/tests/cooperative-vector/matrix-mul-bias-packed.slang index 24d844fa118..16975cd09d9 100644 --- a/tests/cooperative-vector/matrix-mul-bias-packed.slang +++ b/tests/cooperative-vector/matrix-mul-bias-packed.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: int32_t diff --git a/tests/cooperative-vector/matrix-mul-bias-rw-packed.slang b/tests/cooperative-vector/matrix-mul-bias-rw-packed.slang index 773caaf4fd4..15f2dd24f11 100644 --- a/tests/cooperative-vector/matrix-mul-bias-rw-packed.slang +++ b/tests/cooperative-vector/matrix-mul-bias-rw-packed.slang @@ -2,7 +2,7 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // Disabled because HLSL can't multiply from *RW*ByteAddressBuffers -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: int32_t // CHECK-NEXT: 35 diff --git a/tests/cooperative-vector/matrix-mul-bias-rw.slang b/tests/cooperative-vector/matrix-mul-bias-rw.slang index 8505c2fd8c8..3f220fbdf46 100644 --- a/tests/cooperative-vector/matrix-mul-bias-rw.slang +++ b/tests/cooperative-vector/matrix-mul-bias-rw.slang @@ -2,7 +2,7 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // Disabled because HLSL doesn't support int8 -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: int32_t // CHECK-NEXT: 35 diff --git a/tests/cooperative-vector/matrix-mul-bias-rwbyteaddress-packed.slang b/tests/cooperative-vector/matrix-mul-bias-rwbyteaddress-packed.slang index 86814666c6d..ea5b3ccdc24 100644 --- a/tests/cooperative-vector/matrix-mul-bias-rwbyteaddress-packed.slang +++ b/tests/cooperative-vector/matrix-mul-bias-rwbyteaddress-packed.slang @@ -2,7 +2,7 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // Disabled because HLSL can't multiply from *RW*ByteAddressBuffers -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: int32_t // CHECK-NEXT: 35 diff --git a/tests/cooperative-vector/matrix-mul-bias-structuredbuffer-packed.slang b/tests/cooperative-vector/matrix-mul-bias-structuredbuffer-packed.slang index d8879c087ad..e9642fcb5e1 100644 --- a/tests/cooperative-vector/matrix-mul-bias-structuredbuffer-packed.slang +++ b/tests/cooperative-vector/matrix-mul-bias-structuredbuffer-packed.slang @@ -2,7 +2,7 @@ // These platforms don't support these operations from structured buffers //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: int32_t // CHECK-NEXT: 35 diff --git a/tests/cooperative-vector/matrix-mul-bias.slang b/tests/cooperative-vector/matrix-mul-bias.slang index 2cafa83dbfe..3b1d70f59e9 100644 --- a/tests/cooperative-vector/matrix-mul-bias.slang +++ b/tests/cooperative-vector/matrix-mul-bias.slang @@ -2,7 +2,7 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // Disabled because HLSL doesn't support int8 -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: int32_t // CHECK-NEXT: 35 diff --git a/tests/cooperative-vector/matrix-mul-byteaddress.slang b/tests/cooperative-vector/matrix-mul-byteaddress.slang index 6278cd7bfaf..7a5d503489c 100644 --- a/tests/cooperative-vector/matrix-mul-byteaddress.slang +++ b/tests/cooperative-vector/matrix-mul-byteaddress.slang @@ -2,7 +2,7 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // Disabled because HLSL doesn't support int8 -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: int32_t // CHECK-NEXT: 30 diff --git a/tests/cooperative-vector/matrix-mul-mut.slang b/tests/cooperative-vector/matrix-mul-mut.slang index 98504f022df..822b57e2ae9 100644 --- a/tests/cooperative-vector/matrix-mul-mut.slang +++ b/tests/cooperative-vector/matrix-mul-mut.slang @@ -2,7 +2,7 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // Disabled because HLSL doesn't support int8 -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: int32_t // CHECK-NEXT: 31 diff --git a/tests/cooperative-vector/matrix-mul-packed-mut.slang b/tests/cooperative-vector/matrix-mul-packed-mut.slang index 7db353936f2..e8e480f748e 100644 --- a/tests/cooperative-vector/matrix-mul-packed-mut.slang +++ b/tests/cooperative-vector/matrix-mul-packed-mut.slang @@ -1,6 +1,6 @@ //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type -//Test(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//Test(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: int32_t // CHECK-NEXT: 31 diff --git a/tests/cooperative-vector/matrix-mul-packed.slang b/tests/cooperative-vector/matrix-mul-packed.slang index 9fa870f76ef..1c3e373a716 100644 --- a/tests/cooperative-vector/matrix-mul-packed.slang +++ b/tests/cooperative-vector/matrix-mul-packed.slang @@ -1,6 +1,6 @@ //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type -//Test(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//Test(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: int32_t // CHECK-NEXT: 30 diff --git a/tests/cooperative-vector/matrix-mul-rw-packed.slang b/tests/cooperative-vector/matrix-mul-rw-packed.slang index 39b8339ef4a..45b3a8b05bc 100644 --- a/tests/cooperative-vector/matrix-mul-rw-packed.slang +++ b/tests/cooperative-vector/matrix-mul-rw-packed.slang @@ -2,7 +2,7 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // Disabled because HLSL can't multiply from *RW*ByteAddressBuffers -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: int32_t // CHECK-NEXT: 30 diff --git a/tests/cooperative-vector/matrix-mul-rw.slang b/tests/cooperative-vector/matrix-mul-rw.slang index d05f8a058bc..fea431f4315 100644 --- a/tests/cooperative-vector/matrix-mul-rw.slang +++ b/tests/cooperative-vector/matrix-mul-rw.slang @@ -2,7 +2,7 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // Disabled because HLSL doesn't support int8 -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: int32_t // CHECK-NEXT: 30 diff --git a/tests/cooperative-vector/matrix-mul-rwbyteaddress-packed.slang b/tests/cooperative-vector/matrix-mul-rwbyteaddress-packed.slang index 39b8339ef4a..45b3a8b05bc 100644 --- a/tests/cooperative-vector/matrix-mul-rwbyteaddress-packed.slang +++ b/tests/cooperative-vector/matrix-mul-rwbyteaddress-packed.slang @@ -2,7 +2,7 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // Disabled because HLSL can't multiply from *RW*ByteAddressBuffers -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: int32_t // CHECK-NEXT: 30 diff --git a/tests/cooperative-vector/matrix-mul-structuredbuffer-packed.slang b/tests/cooperative-vector/matrix-mul-structuredbuffer-packed.slang index 0b41099d297..b91ec3a568c 100644 --- a/tests/cooperative-vector/matrix-mul-structuredbuffer-packed.slang +++ b/tests/cooperative-vector/matrix-mul-structuredbuffer-packed.slang @@ -2,7 +2,7 @@ // These platforms don't support these operations from structured buffers //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: int32_t // CHECK-NEXT: 30 diff --git a/tests/cooperative-vector/matrix-mul.slang b/tests/cooperative-vector/matrix-mul.slang index 6ef83f2f8e1..876f7ea50c6 100644 --- a/tests/cooperative-vector/matrix-mul.slang +++ b/tests/cooperative-vector/matrix-mul.slang @@ -2,7 +2,7 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // Disabled because HLSL doesn't support int8 -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: int32_t // CHECK-NEXT: 30 diff --git a/tests/cooperative-vector/max.slang b/tests/cooperative-vector/max.slang index 285897a4534..09eff40d7fa 100644 --- a/tests/cooperative-vector/max.slang +++ b/tests/cooperative-vector/max.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: float diff --git a/tests/cooperative-vector/min.slang b/tests/cooperative-vector/min.slang index 28e8a32a47d..25c36313308 100644 --- a/tests/cooperative-vector/min.slang +++ b/tests/cooperative-vector/min.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: float diff --git a/tests/cooperative-vector/mod.slang b/tests/cooperative-vector/mod.slang index f35e3f5ff52..5967dc23171 100644 --- a/tests/cooperative-vector/mod.slang +++ b/tests/cooperative-vector/mod.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -emit-spirv-directly -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu // CHECK: 0 diff --git a/tests/cooperative-vector/mul.slang b/tests/cooperative-vector/mul.slang index 9e6b305ca67..84765cdc5d0 100644 --- a/tests/cooperative-vector/mul.slang +++ b/tests/cooperative-vector/mul.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: int32_t diff --git a/tests/cooperative-vector/outer-product-structuredbuffer.slang b/tests/cooperative-vector/outer-product-structuredbuffer.slang index 954fbf77247..a2bbde40a65 100644 --- a/tests/cooperative-vector/outer-product-structuredbuffer.slang +++ b/tests/cooperative-vector/outer-product-structuredbuffer.slang @@ -1,7 +1,7 @@ //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type // These platforms don't support these operations into structured buffers -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: half diff --git a/tests/cooperative-vector/outer-product.slang b/tests/cooperative-vector/outer-product.slang index f2c22fa84f1..21f133956bb 100644 --- a/tests/cooperative-vector/outer-product.slang +++ b/tests/cooperative-vector/outer-product.slang @@ -1,7 +1,7 @@ //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type // HLSL doesn't support the training operations -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // Disabled because of some pecularities stemming from our lowering of half to float //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type diff --git a/tests/cooperative-vector/reduce-sum-accumulate-structuredbuffer.slang b/tests/cooperative-vector/reduce-sum-accumulate-structuredbuffer.slang index 2d843b8f322..fd7ade6ed6d 100644 --- a/tests/cooperative-vector/reduce-sum-accumulate-structuredbuffer.slang +++ b/tests/cooperative-vector/reduce-sum-accumulate-structuredbuffer.slang @@ -2,7 +2,7 @@ ///TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // HLSL doesn't support the training operations -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: half // CHECK-NEXT: 112.000000 diff --git a/tests/cooperative-vector/reduce-sum-accumulate.slang b/tests/cooperative-vector/reduce-sum-accumulate.slang index 2d843b8f322..fd7ade6ed6d 100644 --- a/tests/cooperative-vector/reduce-sum-accumulate.slang +++ b/tests/cooperative-vector/reduce-sum-accumulate.slang @@ -2,7 +2,7 @@ ///TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // HLSL doesn't support the training operations -//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc // CHECK: type: half // CHECK-NEXT: 112.000000 diff --git a/tests/cooperative-vector/scalar-mul.slang b/tests/cooperative-vector/scalar-mul.slang index ee76a3fd571..f9fed6d7de1 100644 --- a/tests/cooperative-vector/scalar-mul.slang +++ b/tests/cooperative-vector/scalar-mul.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: float diff --git a/tests/cooperative-vector/simple.slang b/tests/cooperative-vector/simple.slang index d7080e9d537..3729996af9c 100644 --- a/tests/cooperative-vector/simple.slang +++ b/tests/cooperative-vector/simple.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: int32_t diff --git a/tests/cooperative-vector/step.slang b/tests/cooperative-vector/step.slang index ba6a184c134..620ad339809 100644 --- a/tests/cooperative-vector/step.slang +++ b/tests/cooperative-vector/step.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: float diff --git a/tests/cooperative-vector/sub.slang b/tests/cooperative-vector/sub.slang index c4a281a7851..af7bd1c9b33 100644 --- a/tests/cooperative-vector/sub.slang +++ b/tests/cooperative-vector/sub.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: int32_t diff --git a/tests/cooperative-vector/subscript.slang b/tests/cooperative-vector/subscript.slang index 46aeb49a188..1a1550bc338 100644 --- a/tests/cooperative-vector/subscript.slang +++ b/tests/cooperative-vector/subscript.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -emit-spirv-directly -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: int32_t diff --git a/tests/cooperative-vector/tanh.slang b/tests/cooperative-vector/tanh.slang index ec73c0851ce..15fecbfa5f6 100644 --- a/tests/cooperative-vector/tanh.slang +++ b/tests/cooperative-vector/tanh.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // Hilariously low precision because the different APIs don't agree (they're diff --git a/tests/cooperative-vector/unary.slang b/tests/cooperative-vector/unary.slang index b60b984e979..f53f09a1814 100644 --- a/tests/cooperative-vector/unary.slang +++ b/tests/cooperative-vector/unary.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -xslang -skip-spirv-validation -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: int32_t diff --git a/tests/cooperative-vector/variadic-init-cast.slang b/tests/cooperative-vector/variadic-init-cast.slang index 2e0751b897c..f156d2d0598 100644 --- a/tests/cooperative-vector/variadic-init-cast.slang +++ b/tests/cooperative-vector/variadic-init-cast.slang @@ -1,5 +1,5 @@ //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -emit-spirv-directly -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: float diff --git a/tests/cooperative-vector/variadic-init.slang b/tests/cooperative-vector/variadic-init.slang index 6f7540a983c..b4a2ea11868 100644 --- a/tests/cooperative-vector/variadic-init.slang +++ b/tests/cooperative-vector/variadic-init.slang @@ -1,5 +1,5 @@ //DISABLE_TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-vk -render-feature cooperative-vector -output-using-type -//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. +//TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-dx12 -render-feature cooperative-vector -dx12-experimental -use-dxil -output-using-type -profile cs_6_8 -Xslang... -Xdxc -Vd -X. -capability hlsl_coopvec_poc //TEST(compute):COMPARE_COMPUTE(filecheck-buffer=CHECK):-cpu -output-using-type // CHECK: type: int32_t