Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
09e5654
Remove deprecated HLSL tests and associated configurations for cooper…
damyanp Mar 23, 2026
46f5ff9
Remove deprecated linear algebra operations and associated error diag…
damyanp Mar 23, 2026
b901747
Rename reserved cooperative vector operations to reserved D and E in …
damyanp Mar 23, 2026
03190fc
Update release notes
damyanp Mar 23, 2026
88ab843
Formatting
damyanp Mar 23, 2026
37af478
Remove accidentally added file
damyanp Mar 23, 2026
14014e0
Remove deprecated linear algebra layout checks and associated functions
damyanp Mar 23, 2026
0b14a20
Remove deprecated validation rules for Linalg operations in db_dxil c…
damyanp Mar 23, 2026
6cc39a5
Fix comment
damyanp Mar 24, 2026
d5c3710
Update docs/ReleaseNotes.md
damyanp Mar 24, 2026
1c3535a
Roll back the unintended regeration of DxilCounters.cpp
damyanp Mar 24, 2026
7a1d568
Merge branch 'byebyecoopvec' of https://github.com/damyanp/DirectXSha…
damyanp Mar 24, 2026
25f5019
Add LinalgMatrixLayout to DxilConstants.h
damyanp Mar 26, 2026
3547cb0
Remove unused static CheckLinalgInterpretation from DxilValidation.cpp
Copilot Mar 26, 2026
e589de4
Merge pull request #11 from damyanp/copilot/fix-linux-macos-build-issues
damyanp Mar 26, 2026
fbb8408
Merge microsoft/main into byebyecoopvec, resolving conflicts from PR …
Copilot Mar 26, 2026
f082a08
Merge pull request #12 from damyanp/copilot/resolve-merge-conflicts
damyanp Mar 26, 2026
35eaa09
Merge remote-tracking branch 'upstream/main' into byebyecoopvec
damyanp Mar 26, 2026
0acb4ec
Fix intrinsic operation codes and update related tests
damyanp Mar 26, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/DXIL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2421,10 +2421,10 @@ ID Name Description
302 ReservedC9 reserved
303 RawBufferVectorLoad reads from a raw buffer and structured buffer
304 RawBufferVectorStore writes to a RWByteAddressBuffer or RWStructuredBuffer
305 MatVecMul Multiplies a MxK dimension matrix and a K sized input vector
306 MatVecMulAdd multiplies a MxK dimension matrix and a K sized input vector and adds an M-sized bias vector
307 OuterProductAccumulate Computes the outer product between column vectors and an MxN matrix is accumulated component-wise atomically (with device scope) in memory
308 VectorAccumulate Accumulates the components of a vector component-wise atomically (with device scope) to the corresponding elements of an array in memory
305 ReservedD0 reserved
306 ReservedD1 reserved
307 ReservedD2 reserved
308 ReservedD3 reserved
309 VectorReduceAnd Bitwise AND reduction of the vector returning a scalar
310 VectorReduceOr Bitwise OR reduction of the vector returning a scalar
311 FDot computes the n-dimensional vector dot-product
Expand Down Expand Up @@ -3095,9 +3095,9 @@ ID Name Description
2147483675 LinAlgMatrixAccumulateToDescriptor accumulates a matrix to a RWByteAddressBuffer
2147483676 LinAlgMatrixAccumulateToMemory accumulates a matrix to groupshared memory
2147483677 LinAlgMatrixOuterProduct Outer products an M sized vector and a N sized vector producing an MxN matrix
2147483678 ReservedD1 reserved
2147483679 ReservedD2 reserved
2147483680 ReservedD3 reserved
2147483678 ReservedE1 reserved
2147483679 ReservedE2 reserved
2147483680 ReservedE3 reserved
2147483681 DebugBreak triggers a breakpoint if a debugger is attached
2147483682 IsDebuggerPresent returns true if a debugger is attached
========== ======================================== ===================================================================================================================
Expand Down
3 changes: 1 addition & 2 deletions docs/ReleaseNotes.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ line upon naming the release. Refer to previous for appropriate section names.

#### Experimental Shader Model 6.10

- Moved Linear Algebra (Cooperative Vector) DXIL Opcodes to experimental Shader Model 6.10
- The Cooperative Vectors API was moved to `coopvec.h` header and under the `dx::coopvec` namespace.
- Removed experimental Cooperative Vector, this has been replaced by LinAlg matrix
Comment thread
damyanp marked this conversation as resolved.
Outdated
- Implement GetGroupWaveIndex and GetGroupWaveCount in experimental Shader Model 6.10.
- [proposal](https://github.com/microsoft/hlsl-specs/blob/main/proposals/0048-group-wave-index.md)
- GetGroupWaveIndex: New intrinsic for Compute, Mesh, Amplification and Node shaders which returns the index of the wave within the thread group that the the thread is executing.
Expand Down
71 changes: 14 additions & 57 deletions include/dxc/DXIL/DxilConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -524,9 +524,9 @@ static const OpCodeTableID TableID = OpCodeTableID::ExperimentalOps;
// Enumeration for ExperimentalOps DXIL operations
enum class OpCode : unsigned {
//
ReservedD1 = 30, // reserved
ReservedD2 = 31, // reserved
ReservedD3 = 32, // reserved
ReservedE1 = 30, // reserved
ReservedE2 = 31, // reserved
ReservedE3 = 32, // reserved

// Debugging
DebugBreak = 33, // triggers a breakpoint if a debugger is attached
Expand Down Expand Up @@ -647,6 +647,10 @@ enum class OpCode : unsigned {
ReservedC7 = 300, // reserved
ReservedC8 = 301, // reserved
ReservedC9 = 302, // reserved
ReservedD0 = 305, // reserved
ReservedD1 = 306, // reserved
ReservedD2 = 307, // reserved
ReservedD3 = 308, // reserved

// Amplification shader instructions
DispatchMesh = 173, // Amplification shader intrinsic DispatchMesh
Expand Down Expand Up @@ -876,19 +880,6 @@ enum class OpCode : unsigned {
CreateHandleForLib =
160, // create resource handle from resource struct for library

// Linear Algebra Operations
MatVecMul =
305, // Multiplies a MxK dimension matrix and a K sized input vector
MatVecMulAdd = 306, // multiplies a MxK dimension matrix and a K sized input
// vector and adds an M-sized bias vector
OuterProductAccumulate =
307, // Computes the outer product between column vectors and an MxN
// matrix is accumulated component-wise atomically (with device
// scope) in memory
VectorAccumulate = 308, // Accumulates the components of a vector
// component-wise atomically (with device scope) to
// the corresponding elements of an array in memory

// Mesh shader instructions
EmitIndices = 169, // emit a primitive's vertex indices in a mesh shader
GetMeshPayload =
Expand Down Expand Up @@ -1351,12 +1342,12 @@ enum class OpCode : unsigned {
ExperimentalOps,
LinAlgMatrixOuterProduct), // Outer products an M sized vector and a N
// sized vector producing an MxN matrix
// ReservedD1 = 0x8000001E, 2147483678U, -2147483618
EXP_OPCODE(ExperimentalOps, ReservedD1), // reserved
// ReservedD2 = 0x8000001F, 2147483679U, -2147483617
EXP_OPCODE(ExperimentalOps, ReservedD2), // reserved
// ReservedD3 = 0x80000020, 2147483680U, -2147483616
EXP_OPCODE(ExperimentalOps, ReservedD3), // reserved
// ReservedE1 = 0x8000001E, 2147483678U, -2147483618
EXP_OPCODE(ExperimentalOps, ReservedE1), // reserved
// ReservedE2 = 0x8000001F, 2147483679U, -2147483617
EXP_OPCODE(ExperimentalOps, ReservedE2), // reserved
// ReservedE3 = 0x80000020, 2147483680U, -2147483616
EXP_OPCODE(ExperimentalOps, ReservedE3), // reserved
// DebugBreak = 0x80000021, 2147483681U, -2147483615
EXP_OPCODE(ExperimentalOps,
DebugBreak), // triggers a breakpoint if a debugger is attached
Expand Down Expand Up @@ -1541,10 +1532,6 @@ enum class OpCodeClass : unsigned {
LinAlgMatrixSetElement,
LinAlgMatrixStoreToDescriptor,
LinAlgMatrixStoreToMemory,
MatVecMul,
MatVecMulAdd,
OuterProductAccumulate,
VectorAccumulate,

// Mesh shader instructions
EmitIndices,
Expand Down Expand Up @@ -1731,7 +1718,7 @@ enum class OpCodeClass : unsigned {
NodeOutputIsValid,
OutputComplete,

NumOpClasses = 225, // exclusive last value of enumeration
NumOpClasses = 221, // exclusive last value of enumeration
};
// OPCODECLASS-ENUM:END

Expand Down Expand Up @@ -1911,29 +1898,6 @@ const unsigned kHitObjectTraceRay_RayDescOpIdx = 7;
const unsigned kHitObjectTraceRay_PayloadOpIdx = 15;
const unsigned kHitObjectTraceRay_NumOp = 16;

// MatVec Ops
const unsigned kMatVecMulInputVectorIdx = 1;
const unsigned kMatVecMulIsInputUnsignedIdx = 2;
const unsigned kMatVecMulInputInterpretationIdx = 3;
const unsigned kMatVecMulMatrixBufferIdx = 4;
const unsigned kMatVecMulMatrixOffsetIdx = 5;
const unsigned kMatVecMulMatrixInterpretationIdx = 6;
const unsigned kMatVecMulMatrixMIdx = 7;
const unsigned kMatVecMulMatrixKIdx = 8;
const unsigned kMatVecMulMatrixLayoutIdx = 9;
const unsigned kMatVecMulMatrixTransposeIdx = 10;
const unsigned kMatVecMulMatrixStrideIdx = 11;
const unsigned kMatVecMulIsOutputUnsignedIdx = 12;

// MatVecAdd
const unsigned kMatVecMulAddBiasInterpretation = 14;
const unsigned kMatVecMulAddIsOutputUnsignedIdx = 15;

// Outer Product Accumulate
const unsigned kOuterProdAccMatrixInterpretation = 5;
const unsigned kOuterProdAccMatrixLayout = 6;
const unsigned kOuterProdAccMatrixStride = 7;

// TODO: add operand index for all the OpCodeClass.
} // namespace OperandIndex

Expand Down Expand Up @@ -2506,13 +2470,6 @@ extern const char *kHostLayoutTypePrefix;

extern const char *kWaveOpsIncludeHelperLanesString;

enum class LinalgMatrixLayout : uint32_t {
RowMajor = 0,
ColumnMajor = 1,
MulOptimal = 2,
OuterProductOptimal = 3,
};
Comment thread
damyanp marked this conversation as resolved.

} // namespace DXIL

} // namespace hlsl
Loading
Loading