Skip to content

Commit 8b33431

Browse files
authored
Remove WaveMatrix (microsoft#6807)
Remove WaveMatrix from main branch. The DXIL operations are changed to Reserved to avoid affect DXIL operation ID.
1 parent d324261 commit 8b33431

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+257
-5110
lines changed

docs/DXIL.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2337,18 +2337,18 @@ ID Name Description
23372337
223 TextureGatherRaw Gather raw elements from 4 texels with no type conversions (SRV type is constrained)
23382338
224 SampleCmpLevel samples a texture and compares a single component against the specified comparison value
23392339
225 TextureStoreSample stores texel data at specified sample index
2340-
226 WaveMatrix_Annotate Annotate a wave matrix pointer with the type information
2341-
227 WaveMatrix_Depth Returns depth (K) value for matrix of specified type
2342-
228 WaveMatrix_Fill Fill wave matrix with scalar value
2343-
229 WaveMatrix_LoadRawBuf Load wave matrix from raw buffer
2344-
230 WaveMatrix_LoadGroupShared Load wave matrix from group shared array
2345-
231 WaveMatrix_StoreRawBuf Store wave matrix to raw buffer
2346-
232 WaveMatrix_StoreGroupShared Store wave matrix to group shared array
2347-
233 WaveMatrix_Multiply Mutiply left and right wave matrix and store in accumulator
2348-
234 WaveMatrix_MultiplyAccumulate Mutiply left and right wave matrix and accumulate into accumulator
2349-
235 WaveMatrix_ScalarOp Perform scalar operation on each element of wave matrix
2350-
236 WaveMatrix_SumAccumulate Sum rows or columns of an input matrix into an existing accumulator fragment matrix
2351-
237 WaveMatrix_Add Element-wise accumulate, or broadcast add of fragment into accumulator
2340+
226 Reserved0 Reserved
2341+
227 Reserved1 Reserved
2342+
228 Reserved2 Reserved
2343+
229 Reserved3 Reserved
2344+
230 Reserved4 Reserved
2345+
231 Reserved5 Reserved
2346+
232 Reserved6 Reserved
2347+
233 Reserved7 Reserved
2348+
234 Reserved8 Reserved
2349+
235 Reserved9 Reserved
2350+
236 Reserved10 Reserved
2351+
237 Reserved11 Reserved
23522352
238 AllocateNodeOutputRecords returns a handle for the output records
23532353
239 GetNodeRecordPtr retrieve node input/output record pointer in address space 6
23542354
240 IncrementOutputCount Select the next logical output count for an EmptyNodeOutput for the whole group or per thread.

include/dxc/DXIL/DxilConstants.h

Lines changed: 20 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,20 @@ inline bool IsFeedbackTexture(DXIL::ResourceKind ResourceKind) {
474474
// OPCODE-ENUM:BEGIN
475475
// Enumeration for operations specified by DXIL
476476
enum class OpCode : unsigned {
477+
//
478+
Reserved0 = 226, // Reserved
479+
Reserved1 = 227, // Reserved
480+
Reserved10 = 236, // Reserved
481+
Reserved11 = 237, // Reserved
482+
Reserved2 = 228, // Reserved
483+
Reserved3 = 229, // Reserved
484+
Reserved4 = 230, // Reserved
485+
Reserved5 = 231, // Reserved
486+
Reserved6 = 232, // Reserved
487+
Reserved7 = 233, // Reserved
488+
Reserved8 = 234, // Reserved
489+
Reserved9 = 235, // Reserved
490+
477491
// Amplification shader instructions
478492
DispatchMesh = 173, // Amplification shader intrinsic DispatchMesh
479493

@@ -946,27 +960,6 @@ enum class OpCode : unsigned {
946960
WaveReadLaneAt = 117, // returns the value from the specified lane
947961
WaveReadLaneFirst = 118, // returns the value from the first lane
948962

949-
// WaveMatrix
950-
WaveMatrix_Add = 237, // Element-wise accumulate, or broadcast add of fragment
951-
// into accumulator
952-
WaveMatrix_Annotate =
953-
226, // Annotate a wave matrix pointer with the type information
954-
WaveMatrix_Depth =
955-
227, // Returns depth (K) value for matrix of specified type
956-
WaveMatrix_Fill = 228, // Fill wave matrix with scalar value
957-
WaveMatrix_LoadGroupShared = 230, // Load wave matrix from group shared array
958-
WaveMatrix_LoadRawBuf = 229, // Load wave matrix from raw buffer
959-
WaveMatrix_Multiply =
960-
233, // Mutiply left and right wave matrix and store in accumulator
961-
WaveMatrix_MultiplyAccumulate =
962-
234, // Mutiply left and right wave matrix and accumulate into accumulator
963-
WaveMatrix_ScalarOp =
964-
235, // Perform scalar operation on each element of wave matrix
965-
WaveMatrix_StoreGroupShared = 232, // Store wave matrix to group shared array
966-
WaveMatrix_StoreRawBuf = 231, // Store wave matrix to raw buffer
967-
WaveMatrix_SumAccumulate = 236, // Sum rows or columns of an input matrix into
968-
// an existing accumulator fragment matrix
969-
970963
// Work Graph intrinsics
971964
FinishedCrossGroupSharing = 243, // returns true if the current thread group
972965
// is the last to access the input
@@ -1003,6 +996,9 @@ enum class OpCode : unsigned {
1003996
// OPCODECLASS-ENUM:BEGIN
1004997
// Groups for DXIL operations with equivalent function templates
1005998
enum class OpCodeClass : unsigned {
999+
//
1000+
Reserved,
1001+
10061002
// Amplification shader instructions
10071003
DispatchMesh,
10081004

@@ -1278,18 +1274,6 @@ enum class OpCodeClass : unsigned {
12781274
WaveReadLaneAt,
12791275
WaveReadLaneFirst,
12801276

1281-
// WaveMatrix
1282-
WaveMatrix_Accumulate,
1283-
WaveMatrix_Annotate,
1284-
WaveMatrix_Depth,
1285-
WaveMatrix_Fill,
1286-
WaveMatrix_LoadGroupShared,
1287-
WaveMatrix_LoadRawBuf,
1288-
WaveMatrix_Multiply,
1289-
WaveMatrix_ScalarOp,
1290-
WaveMatrix_StoreGroupShared,
1291-
WaveMatrix_StoreRawBuf,
1292-
12931277
// Work Graph intrinsics
12941278
FinishedCrossGroupSharing,
12951279
GetInputRecordCount,
@@ -1306,9 +1290,9 @@ enum class OpCodeClass : unsigned {
13061290
NumOpClasses_Dxil_1_5 = 143,
13071291
NumOpClasses_Dxil_1_6 = 149,
13081292
NumOpClasses_Dxil_1_7 = 153,
1309-
NumOpClasses_Dxil_1_8 = 183,
1293+
NumOpClasses_Dxil_1_8 = 174,
13101294

1311-
NumOpClasses = 183 // exclusive last value of enumeration
1295+
NumOpClasses = 174 // exclusive last value of enumeration
13121296
};
13131297
// OPCODECLASS-ENUM:END
13141298

@@ -1817,29 +1801,6 @@ enum class SamplerFeedbackType : uint8_t {
18171801
LastEntry = 2
18181802
};
18191803

1820-
enum class WaveMatrixKind : uint8_t {
1821-
Left = 0,
1822-
Right = 1,
1823-
LeftColAcc = 2,
1824-
RightRowAcc = 3,
1825-
Accumulator = 4,
1826-
NumKinds = 5,
1827-
MaskSide = 1,
1828-
MaskClass = 6, // 0 = Left/Right, 2 = Fragment, 4 = Accumulator
1829-
};
1830-
1831-
/* <py::lines('WAVEMATRIXSCALAROPCODE-ENUM')>hctdb_instrhelp.get_enum_decl("WaveMatrixScalarOpCode")</py>*/
1832-
// WAVEMATRIXSCALAROPCODE-ENUM:BEGIN
1833-
// Operation for WaveMatrix_ScalarOp
1834-
enum class WaveMatrixScalarOpCode : unsigned {
1835-
Add = 0,
1836-
Divide = 3,
1837-
Invalid = 4,
1838-
Multiply = 2,
1839-
Subtract = 1,
1840-
};
1841-
// WAVEMATRIXSCALAROPCODE-ENUM:END
1842-
18431804
// Corresponds to MEMORY_TYPE_FLAG enums in HLSL
18441805
enum class MemoryTypeFlag : uint32_t {
18451806
UavMemory = 0x00000001, // UAV_MEMORY
@@ -1922,8 +1883,7 @@ const uint64_t ShaderFeatureInfo_SampleCmpGradientOrBias = 0x80000000;
19221883
const uint64_t ShaderFeatureInfo_ExtendedCommandInfo = 0x100000000;
19231884

19241885
// Experimental SM 6.9+ - Reserved, not yet supported.
1925-
// WaveMMA slots in between two SM 6.6 feature bits.
1926-
const uint64_t ShaderFeatureInfo_WaveMMA = 0x8000000;
1886+
const uint64_t ShaderFeatureInfo_Reserved = 0x8000000;
19271887

19281888
// Maximum count without rolling over into another 64-bit field is 40,
19291889
// so the last flag we can use for a feature requirement is: 0x8000000000

0 commit comments

Comments
 (0)