@@ -204,6 +204,13 @@ enum class MatrixScope : uint32_t {
204204 ThreadGroup = 2 ,
205205};
206206
207+ enum class LinalgMatrixLayout : uint32_t {
208+ RowMajor = 0 ,
209+ ColumnMajor = 1 ,
210+ MulOptimal = 2 ,
211+ OuterProductOptimal = 3 ,
212+ };
213+
207214// Must match D3D_INTERPOLATION_MODE
208215enum class InterpolationMode : uint8_t {
209216 Undefined = 0 ,
@@ -524,9 +531,8 @@ static const OpCodeTableID TableID = OpCodeTableID::ExperimentalOps;
524531// Enumeration for ExperimentalOps DXIL operations
525532enum class OpCode : unsigned {
526533 //
527- ReservedD1 = 30 , // reserved
528- ReservedD2 = 31 , // reserved
529- ReservedD3 = 32 , // reserved
534+ ReservedE0 = 31 , // reserved
535+ ReservedE1 = 32 , // reserved
530536
531537 // Debugging
532538 DebugBreak = 33 , // triggers a breakpoint if a debugger is attached
@@ -545,6 +551,8 @@ enum class OpCode : unsigned {
545551 9 , // returns committed triangle vertices in object space as <9 x float>
546552
547553 // Linear Algebra Operations
554+ LinAlgConvert =
555+ 30 , // Convert vector components from one interpretation to another
548556 LinAlgCopyConvertMatrix =
549557 13 , // Converts and copies the element and use type of the source matrix
550558 // to the destination matrix with optional transpose
@@ -647,6 +655,10 @@ enum class OpCode : unsigned {
647655 ReservedC7 = 300 , // reserved
648656 ReservedC8 = 301 , // reserved
649657 ReservedC9 = 302 , // reserved
658+ ReservedD0 = 305 , // reserved
659+ ReservedD1 = 306 , // reserved
660+ ReservedD2 = 307 , // reserved
661+ ReservedD3 = 308 , // reserved
650662
651663 // Amplification shader instructions
652664 DispatchMesh = 173 , // Amplification shader intrinsic DispatchMesh
@@ -876,19 +888,6 @@ enum class OpCode : unsigned {
876888 CreateHandleForLib =
877889 160 , // create resource handle from resource struct for library
878890
879- // Linear Algebra Operations
880- MatVecMul =
881- 305 , // Multiplies a MxK dimension matrix and a K sized input vector
882- MatVecMulAdd = 306 , // multiplies a MxK dimension matrix and a K sized input
883- // vector and adds an M-sized bias vector
884- OuterProductAccumulate =
885- 307 , // Computes the outer product between column vectors and an MxN
886- // matrix is accumulated component-wise atomically (with device
887- // scope) in memory
888- VectorAccumulate = 308 , // Accumulates the components of a vector
889- // component-wise atomically (with device scope) to
890- // the corresponding elements of an array in memory
891-
892891 // Mesh shader instructions
893892 EmitIndices = 169 , // emit a primitive's vertex indices in a mesh shader
894893 GetMeshPayload =
@@ -1351,12 +1350,13 @@ enum class OpCode : unsigned {
13511350 ExperimentalOps,
13521351 LinAlgMatrixOuterProduct), // Outer products an M sized vector and a N
13531352 // sized vector producing an MxN matrix
1354- // ReservedD1 = 0x8000001E, 2147483678U, -2147483618
1355- EXP_OPCODE (ExperimentalOps, ReservedD1), // reserved
1356- // ReservedD2 = 0x8000001F, 2147483679U, -2147483617
1357- EXP_OPCODE (ExperimentalOps, ReservedD2), // reserved
1358- // ReservedD3 = 0x80000020, 2147483680U, -2147483616
1359- EXP_OPCODE (ExperimentalOps, ReservedD3), // reserved
1353+ // LinAlgConvert = 0x8000001E, 2147483678U, -2147483618
1354+ EXP_OPCODE (ExperimentalOps, LinAlgConvert), // Convert vector components from
1355+ // one interpretation to another
1356+ // ReservedE0 = 0x8000001F, 2147483679U, -2147483617
1357+ EXP_OPCODE (ExperimentalOps, ReservedE0), // reserved
1358+ // ReservedE1 = 0x80000020, 2147483680U, -2147483616
1359+ EXP_OPCODE (ExperimentalOps, ReservedE1), // reserved
13601360 // DebugBreak = 0x80000021, 2147483681U, -2147483615
13611361 EXP_OPCODE (ExperimentalOps,
13621362 DebugBreak), // triggers a breakpoint if a debugger is attached
@@ -1522,6 +1522,7 @@ enum class OpCodeClass : unsigned {
15221522 CreateHandleForLib,
15231523
15241524 // Linear Algebra Operations
1525+ LinAlgConvert,
15251526 LinAlgCopyConvertMatrix,
15261527 LinAlgFillMatrix,
15271528 LinAlgMatVecMul,
@@ -1541,10 +1542,6 @@ enum class OpCodeClass : unsigned {
15411542 LinAlgMatrixSetElement,
15421543 LinAlgMatrixStoreToDescriptor,
15431544 LinAlgMatrixStoreToMemory,
1544- MatVecMul,
1545- MatVecMulAdd,
1546- OuterProductAccumulate,
1547- VectorAccumulate,
15481545
15491546 // Mesh shader instructions
15501547 EmitIndices,
@@ -1731,7 +1728,7 @@ enum class OpCodeClass : unsigned {
17311728 NodeOutputIsValid,
17321729 OutputComplete,
17331730
1734- NumOpClasses = 225 , // exclusive last value of enumeration
1731+ NumOpClasses = 222 , // exclusive last value of enumeration
17351732};
17361733// OPCODECLASS-ENUM:END
17371734
@@ -1911,29 +1908,6 @@ const unsigned kHitObjectTraceRay_RayDescOpIdx = 7;
19111908const unsigned kHitObjectTraceRay_PayloadOpIdx = 15 ;
19121909const unsigned kHitObjectTraceRay_NumOp = 16 ;
19131910
1914- // MatVec Ops
1915- const unsigned kMatVecMulInputVectorIdx = 1 ;
1916- const unsigned kMatVecMulIsInputUnsignedIdx = 2 ;
1917- const unsigned kMatVecMulInputInterpretationIdx = 3 ;
1918- const unsigned kMatVecMulMatrixBufferIdx = 4 ;
1919- const unsigned kMatVecMulMatrixOffsetIdx = 5 ;
1920- const unsigned kMatVecMulMatrixInterpretationIdx = 6 ;
1921- const unsigned kMatVecMulMatrixMIdx = 7 ;
1922- const unsigned kMatVecMulMatrixKIdx = 8 ;
1923- const unsigned kMatVecMulMatrixLayoutIdx = 9 ;
1924- const unsigned kMatVecMulMatrixTransposeIdx = 10 ;
1925- const unsigned kMatVecMulMatrixStrideIdx = 11 ;
1926- const unsigned kMatVecMulIsOutputUnsignedIdx = 12 ;
1927-
1928- // MatVecAdd
1929- const unsigned kMatVecMulAddBiasInterpretation = 14 ;
1930- const unsigned kMatVecMulAddIsOutputUnsignedIdx = 15 ;
1931-
1932- // Outer Product Accumulate
1933- const unsigned kOuterProdAccMatrixInterpretation = 5 ;
1934- const unsigned kOuterProdAccMatrixLayout = 6 ;
1935- const unsigned kOuterProdAccMatrixStride = 7 ;
1936-
19371911// TODO: add operand index for all the OpCodeClass.
19381912} // namespace OperandIndex
19391913
@@ -2506,13 +2480,6 @@ extern const char *kHostLayoutTypePrefix;
25062480
25072481extern const char *kWaveOpsIncludeHelperLanesString ;
25082482
2509- enum class LinalgMatrixLayout : uint32_t {
2510- RowMajor = 0 ,
2511- ColumnMajor = 1 ,
2512- MulOptimal = 2 ,
2513- OuterProductOptimal = 3 ,
2514- };
2515-
25162483} // namespace DXIL
25172484
25182485} // namespace hlsl
0 commit comments