Skip to content

Commit 871694c

Browse files
committed
Merge remote-tracking branch 'ms/staging-sm6.9' into coop-vec-5
2 parents a3f76ef + 969168d commit 871694c

12 files changed

Lines changed: 378 additions & 74 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -762,9 +762,7 @@ if (LLVM_INCLUDE_DOCS)
762762
add_subdirectory(docs)
763763
endif()
764764

765-
if (LLVM_BUILD_DOCS)
766-
add_hlsl_hctgen(DxilDocs OUTPUT docs/DXIL.rst CODE_TAG) # HLSL Change
767-
endif()
765+
add_hlsl_hctgen(DxilDocs OUTPUT docs/DXIL.rst CODE_TAG) # HLSL Change
768766

769767
add_subdirectory(cmake/modules)
770768

docs/DXIL.rst

Lines changed: 43 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -2376,34 +2376,34 @@ ID Name Description
23762376
259 ReservedA0 reserved
23772377
260 ReservedA1 reserved
23782378
261 ReservedA2 reserved
2379-
262 ReservedB0 reserved
2380-
263 ReservedB1 reserved
2381-
264 ReservedB2 reserved
2379+
262 HitObject_TraceRay Analogous to TraceRay but without invoking CH/MS and returns the intermediate state as a HitObject
2380+
263 HitObject_FromRayQuery Creates a new HitObject representing a committed hit from a RayQuery
2381+
264 HitObject_FromRayQueryWithAttrs Creates a new HitObject representing a committed hit from a RayQuery and committed attributes
23822382
265 HitObject_MakeMiss Creates a new HitObject representing a miss
23832383
266 HitObject_MakeNop Creates an empty nop HitObject
2384-
267 ReservedB5 reserved
2385-
268 ReservedB6 reserved
2386-
269 ReservedB7 reserved
2387-
270 ReservedB8 reserved
2388-
271 ReservedB9 reserved
2389-
272 ReservedB10 reserved
2390-
273 ReservedB11 reserved
2391-
274 ReservedB12 reserved
2392-
275 ReservedB13 reserved
2393-
276 ReservedB14 reserved
2394-
277 ReservedB15 reserved
2395-
278 ReservedB16 reserved
2396-
279 ReservedB17 reserved
2397-
280 ReservedB18 reserved
2398-
281 ReservedB19 reserved
2399-
282 ReservedB20 reserved
2400-
283 ReservedB21 reserved
2401-
284 ReservedB22 reserved
2402-
285 ReservedB23 reserved
2403-
286 ReservedB24 reserved
2404-
287 ReservedB25 reserved
2405-
288 ReservedB26 reserved
2406-
289 ReservedB27 reserved
2384+
267 HitObject_Invoke Represents the invocation of the CH/MS shader represented by the HitObject
2385+
268 MaybeReorderThread Reorders the current thread
2386+
269 HitObject_IsMiss Returns `true` if the HitObject represents a miss
2387+
270 HitObject_IsHit Returns `true` if the HitObject is a NOP-HitObject
2388+
271 HitObject_IsNop Returns `true` if the HitObject represents a nop
2389+
272 HitObject_RayFlags Returns the ray flags set in the HitObject
2390+
273 HitObject_RayTMin Returns the TMin value set in the HitObject
2391+
274 HitObject_RayTCurrent Returns the current T value set in the HitObject
2392+
275 HitObject_WorldRayOrigin Returns the ray origin in world space
2393+
276 HitObject_WorldRayDirection Returns the ray direction in world space
2394+
277 HitObject_ObjectRayOrigin Returns the ray origin in object space
2395+
278 HitObject_ObjectRayDirection Returns the ray direction in object space
2396+
279 HitObject_ObjectToWorld3x4 Returns the object to world space transformation matrix in 3x4 form
2397+
280 HitObject_WorldToObject3x4 Returns the world to object space transformation matrix in 3x4 form
2398+
281 HitObject_GeometryIndex Returns the geometry index committed on hit
2399+
282 HitObject_InstanceIndex Returns the instance index committed on hit
2400+
283 HitObject_InstanceID Returns the instance id committed on hit
2401+
284 HitObject_PrimitiveIndex Returns the primitive index committed on hit
2402+
285 HitObject_HitKind Returns the HitKind of the hit
2403+
286 HitObject_ShaderTableIndex Returns the shader table index set for this HitObject
2404+
287 HitObject_SetShaderTableIndex Returns a HitObject with updated shader table index
2405+
288 HitObject_LoadLocalRootTableConstant Returns the root table constant for this HitObject and offset
2406+
289 HitObject_Attributes Returns the attributes set for this HitObject
24072407
290 ReservedB28 reserved
24082408
291 ReservedB29 reserved
24092409
292 ReservedB30 reserved
@@ -2419,10 +2419,10 @@ ID Name Description
24192419
302 ReservedC9 reserved
24202420
303 RawBufferVectorLoad reads from a raw buffer and structured buffer
24212421
304 RawBufferVectorStore writes to a RWByteAddressBuffer or RWStructuredBuffer
2422-
305 MatVecMul Matrix-Vector Multiply
2423-
306 MatVecMulAdd Matrix-Vector Multiply Add
2424-
307 OuterProductAccumulate Outer Product Accumulate
2425-
308 VectorAccumulate Vector Accumulate
2422+
305 MatVecMul Multiplies a MxK dimension matrix and a K sized input vector
2423+
306 MatVecMulAdd multiplies a MxK dimension matrix and a K sized input vector and adds an M-sized bias vector
2424+
307 OuterProductAccumulate Computes the outer product between column vectors and an MxN matrix is accumulated component-wise atomically (with device scope) in memory
2425+
308 VectorAccumulate Accumulates the components of a vector component-wise atomically (with device scope) to the corresponding elements of an array in memory
24262426
=== ===================================================== =======================================================================================================================================================================================================================
24272427

24282428

@@ -3124,8 +3124,9 @@ INSTR.CANNOTPULLPOSITION pull-model evaluation of p
31243124
INSTR.CBUFFERCLASSFORCBUFFERHANDLE Expect Cbuffer for CBufferLoad handle.
31253125
INSTR.CBUFFEROUTOFBOUND Cbuffer access out of bound.
31263126
INSTR.CHECKACCESSFULLYMAPPED CheckAccessFullyMapped should only be used on resource status.
3127-
INSTR.COORDINATECOUNTFORRAWTYPEDBUF raw/typed buffer don't need 2 coordinates.
3128-
INSTR.COORDINATECOUNTFORSTRUCTBUF structured buffer require 2 coordinates.
3127+
INSTR.CONSTALIGNFORRAWBUF Raw Buffer alignment value must be a constant.
3128+
INSTR.COORDINATECOUNTFORRAWTYPEDBUF raw/typed buffer offset must be undef.
3129+
INSTR.COORDINATECOUNTFORSTRUCTBUF structured buffer requires defined index and offset coordinates.
31293130
INSTR.CREATEHANDLEIMMRANGEID Local resource must map to global resource.
31303131
INSTR.DXILSTRUCTUSER Dxil struct types should only be used by ExtractValue.
31313132
INSTR.DXILSTRUCTUSEROUTOFBOUND Index out of bound when extract value from dxil struct types.
@@ -3137,6 +3138,15 @@ INSTR.ILLEGALDXILOPCODE DXILOpCode must be [0..%0]
31373138
INSTR.ILLEGALDXILOPFUNCTION '%0' is not a DXILOpFuncition for DXILOpcode '%1'.
31383139
INSTR.IMMBIASFORSAMPLEB bias amount for sample_b must be in the range [%0,%1], but %2 was specified as an immediate.
31393140
INSTR.INBOUNDSACCESS Access to out-of-bounds memory is disallowed.
3141+
INSTR.LINALGINTERPRETATIONPARAMARECONST Interpretation values are constants
3142+
INSTR.LINALGINVALIDMATRIXLAYOUTVALUE Matrix Layout for Linalg ops not in valid set
3143+
INSTR.LINALGINVALIDMEMORYINTERPVALUE In Memory Interpolation value not in valid set
3144+
INSTR.LINALGINVALIDREGISTERINTERPVALUE From Register Interpretation value not in valid set
3145+
INSTR.LINALGMATRIXLAYOUTNOTTRANSPOSABLE Matrix Layout not transposable
3146+
INSTR.LINALGMATRIXSHAPEPARAMSARECONST Matrix Layout, Dimensions and isTranspose are immediate constants
3147+
INSTR.LINALGNOTANUNSIGNEDTYPE Unsigned flag set for signed type
3148+
INSTR.MATVECOPISUNSIGNEDFLAGSARECONST MatVec Ops Is Unsigned flag is a constant
3149+
INSTR.MAYREORDERTHREADUNDEFCOHERENCEHINTPARAM Use of undef coherence hint or num coherence hint bits in MaybeReorderThread.
31403150
INSTR.MINPRECISIONNOTPRECISE Instructions marked precise may not refer to minprecision values.
31413151
INSTR.MINPRECISONBITCAST Bitcast on minprecison types is not allowed.
31423152
INSTR.MIPLEVELFORGETDIMENSION Use mip level on buffer when GetDimensions.
@@ -3193,6 +3203,7 @@ INSTR.STRUCTBITCAST Bitcast on struct types is
31933203
INSTR.SVCONFLICTINGLAUNCHMODE Input system values are compatible with node shader launch mode.
31943204
INSTR.TEXTUREOFFSET offset texture instructions must take offset which can resolve to integer literal in the range -8 to 7.
31953205
INSTR.TGSMRACECOND Race condition writing to shared memory detected, consider making this write conditional.
3206+
INSTR.UNDEFHITOBJECT HitObject is undef.
31963207
INSTR.UNDEFINEDVALUEFORUAVSTORE Assignment of undefined values to UAV.
31973208
INSTR.UNDEFRESULTFORGETDIMENSION GetDimensions used undef dimension %0 on %1.
31983209
INSTR.WRITEMASKFORTYPEDUAVSTORE store on typed uav must write to all four components of the UAV.

include/dxc/HlslIntrinsicOp.h

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -107,10 +107,10 @@ enum class IntrinsicOp {
107107
IOP_WorldToObject = 99,
108108
IOP_WorldToObject3x4 = 100,
109109
IOP_WorldToObject4x3 = 101,
110-
IOP___builtin_MatVecMul = 363,
111-
IOP___builtin_MatVecMulAdd = 364,
112-
IOP___builtin_OuterProductAccumulate = 365,
113-
IOP___builtin_VectorAccumulate = 366,
110+
IOP___builtin_MatVecMul = 390,
111+
IOP___builtin_MatVecMulAdd = 391,
112+
IOP___builtin_OuterProductAccumulate = 392,
113+
IOP___builtin_VectorAccumulate = 393,
114114
IOP_abort = 102,
115115
IOP_abs = 103,
116116
IOP_acos = 104,
@@ -340,7 +340,34 @@ enum class IntrinsicOp {
340340
MOP_TraceRayInline = 325,
341341
MOP_WorldRayDirection = 326,
342342
MOP_WorldRayOrigin = 327,
343+
MOP_DxHitObject_FromRayQuery = 363,
344+
MOP_DxHitObject_GetAttributes = 364,
345+
MOP_DxHitObject_GetGeometryIndex = 365,
346+
MOP_DxHitObject_GetHitKind = 366,
347+
MOP_DxHitObject_GetInstanceID = 367,
348+
MOP_DxHitObject_GetInstanceIndex = 368,
349+
MOP_DxHitObject_GetObjectRayDirection = 369,
350+
MOP_DxHitObject_GetObjectRayOrigin = 370,
351+
MOP_DxHitObject_GetObjectToWorld3x4 = 371,
352+
MOP_DxHitObject_GetObjectToWorld4x3 = 372,
353+
MOP_DxHitObject_GetPrimitiveIndex = 373,
354+
MOP_DxHitObject_GetRayFlags = 374,
355+
MOP_DxHitObject_GetRayTCurrent = 375,
356+
MOP_DxHitObject_GetRayTMin = 376,
357+
MOP_DxHitObject_GetShaderTableIndex = 377,
358+
MOP_DxHitObject_GetWorldRayDirection = 378,
359+
MOP_DxHitObject_GetWorldRayOrigin = 379,
360+
MOP_DxHitObject_GetWorldToObject3x4 = 380,
361+
MOP_DxHitObject_GetWorldToObject4x3 = 381,
362+
MOP_DxHitObject_Invoke = 382,
363+
MOP_DxHitObject_IsHit = 383,
364+
MOP_DxHitObject_IsMiss = 384,
365+
MOP_DxHitObject_IsNop = 385,
366+
MOP_DxHitObject_LoadLocalRootTableConstant = 386,
367+
MOP_DxHitObject_MakeMiss = 387,
343368
MOP_DxHitObject_MakeNop = 358,
369+
MOP_DxHitObject_SetShaderTableIndex = 388,
370+
MOP_DxHitObject_TraceRay = 389,
344371
IOP_DxMaybeReorderThread = 359,
345372
MOP_Count = 328,
346373
MOP_FinishedCrossGroupSharing = 329,
@@ -373,7 +400,7 @@ enum class IntrinsicOp {
373400
IOP_usign = 355,
374401
MOP_InterlockedUMax = 356,
375402
MOP_InterlockedUMin = 357,
376-
Num_Intrinsics = 367,
403+
Num_Intrinsics = 394,
377404
};
378405
inline bool HasUnsignedIntrinsicOpcode(IntrinsicOp opcode) {
379406
switch (opcode) {

include/dxc/dxcapi.internal.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,12 +131,13 @@ enum LEGAL_INTRINSIC_COMPTYPES {
131131
LICOMPTYPE_THREAD_NODE_OUTPUT_RECORDS = 50,
132132

133133
LICOMPTYPE_HIT_OBJECT = 51,
134+
LICOMPTYPE_RAY_QUERY = 52,
134135

135136
#ifdef ENABLE_SPIRV_CODEGEN
136-
LICOMPTYPE_VK_BUFFER_POINTER = 52,
137-
LICOMPTYPE_COUNT = 53
137+
LICOMPTYPE_VK_BUFFER_POINTER = 53,
138+
LICOMPTYPE_COUNT = 54
138139
#else
139-
LICOMPTYPE_COUNT = 52
140+
LICOMPTYPE_COUNT = 53
140141
#endif
141142
};
142143

0 commit comments

Comments
 (0)