Skip to content

[0027] Avoid using undef for dx.op.MaybeReorderThread #487

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
11 changes: 6 additions & 5 deletions proposals/0027-shader-execution-reordering.md
Original file line number Diff line number Diff line change
Expand Up @@ -1393,9 +1393,9 @@ Validation errors:
#### MaybeReorderThread

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

```DXIL
declare void @dx.op.MaybeReorderThread(
Expand All @@ -1407,8 +1407,9 @@ declare void @dx.op.MaybeReorderThread(
```

Validation errors:
- Validate that `coherence hint` is not undef.
- Validate that `num coherence hint bits from LSB` is not undef.
- Validate that `coherence hint` is not `undef` if `num coherence hint bits from LSB` is nonzero.
- Validate that `hit object` is not `undef`.
- Validate that `num coherence hint bits from LSB` is not `undef`.

#### HitObject_SetShaderTableIndex

Expand Down