Skip to content

Commit c982e78

Browse files
authored
Avoid using undef for dx.op.MaybeReorderThread (#487)
fixes #485
1 parent 7988853 commit c982e78

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

proposals/0027-shader-execution-reordering.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1393,9 +1393,9 @@ Validation errors:
13931393
#### MaybeReorderThread
13941394

13951395
Operation that reorders the current thread based on the supplied hints and
1396-
`HitObject`. The canonical lowering of the
1397-
HLSL intrinsic `MaybeReorderThread( uint CoherenceHint, uint NumCoherenceHintBitsFromLSB )`
1398-
uses `undef` for the `HitObject` parameter.
1396+
`HitObject`. The HLSL overload without `HitObject` is lowered to the same intrinsic
1397+
with a NOP-HitObject (`HitObject_MakeNop`). The HLSL overload without coherence
1398+
hints is lowered by specifying `0` for `number of coherence hint bits from LSB`.
13991399

14001400
```DXIL
14011401
declare void @dx.op.MaybeReorderThread(
@@ -1407,8 +1407,9 @@ declare void @dx.op.MaybeReorderThread(
14071407
```
14081408

14091409
Validation errors:
1410-
- Validate that `coherence hint` is not undef.
1411-
- Validate that `num coherence hint bits from LSB` is not undef.
1410+
- Validate that `coherence hint` is not `undef` if `num coherence hint bits from LSB` is nonzero.
1411+
- Validate that `hit object` is not `undef`.
1412+
- Validate that `num coherence hint bits from LSB` is not `undef`.
14121413

14131414
#### HitObject_SetShaderTableIndex
14141415

0 commit comments

Comments
 (0)