Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
20 changes: 15 additions & 5 deletions docs/DXIL.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3062,11 +3062,21 @@ Given width, offset:

Opcode Table ExperimentalOps, id=32768: Experimental DXIL operations

========== =============== ================
ID Name Description
========== =============== ================
2147483648 ExperimentalNop nop does nothing
========== =============== ================
========== ======================================== ==================================================================
ID Name Description
========== ======================================== ==================================================================
2147483648 ExperimentalNop nop does nothing
2147483649 GetGroupWaveIndex returns the index of the wave in the thread group
2147483650 GetGroupWaveCount returns the number of waves in the thread group
2147483651 ClusterID returns the user-defined ClusterID of the intersected CLAS
2147483652 RayQuery_CandidateClusterID returns candidate hit cluster ID
2147483653 RayQuery_CommittedClusterID returns committed hit cluster ID
2147483654 HitObject_ClusterID returns the cluster ID of this committed hit
2147483655 TriangleObjectPosition returns triangle vertices in object space as <9 x float>
2147483656 RayQuery_CandidateTriangleObjectPosition returns candidate triangle vertices in object space as <9 x float>
2147483657 RayQuery_CommittedTriangleObjectPosition returns committed triangle vertices in object space as <9 x float>
2147483658 HitObject_TriangleObjectPosition returns triangle vertices in object space as <9 x float>
========== ======================================== ==================================================================


.. OPCODES-RST:END
Expand Down
71 changes: 69 additions & 2 deletions include/dxc/DXIL/DxilConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -511,10 +511,34 @@ namespace ExperimentalOps {
static const OpCodeTableID TableID = OpCodeTableID::ExperimentalOps;
// Enumeration for ExperimentalOps DXIL operations
enum class OpCode : unsigned {
// Group Wave Ops
GetGroupWaveCount = 2, // returns the number of waves in the thread group
GetGroupWaveIndex = 1, // returns the index of the wave in the thread group

// Inline Ray Query
RayQuery_CandidateClusterID = 4, // returns candidate hit cluster ID
RayQuery_CandidateTriangleObjectPosition =
8, // returns candidate triangle vertices in object space as <9 x float>
RayQuery_CommittedClusterID = 5, // returns committed hit cluster ID
RayQuery_CommittedTriangleObjectPosition =
9, // returns committed triangle vertices in object space as <9 x float>

// No-op
ExperimentalNop = 0, // nop does nothing

NumOpCodes = 1, // exclusive last value of enumeration
// Raytracing System Values
TriangleObjectPosition =
7, // returns triangle vertices in object space as <9 x float>

// Raytracing uint System Values
ClusterID = 3, // returns the user-defined ClusterID of the intersected CLAS

// Shader Execution Reordering
HitObject_ClusterID = 6, // returns the cluster ID of this committed hit
HitObject_TriangleObjectPosition =
10, // returns triangle vertices in object space as <9 x float>

NumOpCodes = 11, // exclusive last value of enumeration
};
} // namespace ExperimentalOps
static const unsigned NumOpCodeTables = 2;
Expand Down Expand Up @@ -1131,6 +1155,38 @@ enum class OpCode : unsigned {
// OpCodeTableID = 32768
// ExperimentalOps
EXP_OPCODE(ExperimentalOps, ExperimentalNop), // nop does nothing
EXP_OPCODE(
ExperimentalOps,
GetGroupWaveIndex), // returns the index of the wave in the thread group
EXP_OPCODE(
ExperimentalOps,
GetGroupWaveCount), // returns the number of waves in the thread group
EXP_OPCODE(
ExperimentalOps,
ClusterID), // returns the user-defined ClusterID of the intersected CLAS
EXP_OPCODE(ExperimentalOps,
RayQuery_CandidateClusterID), // returns candidate hit cluster ID
EXP_OPCODE(ExperimentalOps,
RayQuery_CommittedClusterID), // returns committed hit cluster ID
EXP_OPCODE(
ExperimentalOps,
HitObject_ClusterID), // returns the cluster ID of this committed hit
EXP_OPCODE(ExperimentalOps,
TriangleObjectPosition), // returns triangle vertices in object
// space as <9 x float>
EXP_OPCODE(
ExperimentalOps,
RayQuery_CandidateTriangleObjectPosition), // returns candidate triangle
// vertices in object space as
// <9 x float>
EXP_OPCODE(
ExperimentalOps,
RayQuery_CommittedTriangleObjectPosition), // returns committed triangle
// vertices in object space as
// <9 x float>
EXP_OPCODE(ExperimentalOps,
HitObject_TriangleObjectPosition), // returns triangle vertices in
// object space as <9 x float>
};
// OPCODE-ENUM:END
#undef EXP_OPCODE
Expand Down Expand Up @@ -1242,6 +1298,10 @@ enum class OpCodeClass : unsigned {
// Graphics shader
ViewID,

// Group Wave Ops
GetGroupWaveCount,
GetGroupWaveIndex,

// Helper Lanes
IsHelperLane,

Expand All @@ -1261,8 +1321,10 @@ enum class OpCodeClass : unsigned {
AllocateRayQuery,
AllocateRayQuery2,
RayQuery_Abort,
RayQuery_CandidateTriangleObjectPosition,
RayQuery_CommitNonOpaqueTriangleHit,
RayQuery_CommitProceduralPrimitiveHit,
RayQuery_CommittedTriangleObjectPosition,
RayQuery_Proceed,
RayQuery_StateMatrix,
RayQuery_StateScalar,
Expand Down Expand Up @@ -1339,6 +1401,9 @@ enum class OpCodeClass : unsigned {
RayTCurrent,
RayTMin,

// Raytracing System Values
TriangleObjectPosition,

// Raytracing hit uint System Values
HitKind,

Expand All @@ -1351,6 +1416,7 @@ enum class OpCodeClass : unsigned {
PrimitiveIndex,

// Raytracing uint System Values
ClusterID,
RayFlags,

// Resources - gather
Expand Down Expand Up @@ -1406,6 +1472,7 @@ enum class OpCodeClass : unsigned {
HitObject_StateScalar,
HitObject_StateVector,
HitObject_TraceRay,
HitObject_TriangleObjectPosition,
MaybeReorderThread,

// Synchronization
Expand Down Expand Up @@ -1465,7 +1532,7 @@ enum class OpCodeClass : unsigned {
NodeOutputIsValid,
OutputComplete,

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

Expand Down
Loading