Shader: order deferred wave-mask exchanges at their definition #53
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/DoubleGhosty--cool_fox!53
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/53/head"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@steven-seagull27 on GitHub · 2026-11-27 01:06 UTC · original
steven-seagull27:codex/deferred-wave-mask-exchange→main· +188 −12 · 4 files · 1 commits · closed without mergingA 128-thread synthetic compute shader on
69718c0defines a lane mask in a block reached by the entire group and reads it as a scalar inside a later, conditional block. The translator emits the exchange at the definition. It used the consumer’s participation when choosing a barrier, overwrote the predecessor’s branch, and panicked during bitcode emission withuse of a void value.This change takes participation from the block that emits the exchange. A group-uniform definition uses a group barrier. A deferred exchange that needs a per-wave meet in an already terminated block returns a translation refusal and preserves its existing branch. The serializer assertion remains in place.
The regression constructs its input from instructions in the test. It checks valid DXIL, covers a nested case that must be refused, and reads back five sets of 128 output words.
For example, with mask limit 68 and active limit 87, threads 63, 64 and 86 produced 149, 166 and 188. Thread 87 kept its initial zero. All three wait-counter dwords stayed zero in every case on both Wave32 adapters.
The focused tests are in
crates/victory-shader/src/emit/wave64_tests.rs. Runcargo test --locked -p victory-shader --features host --lib emit::wave64_tests:: -- --nocapture --test-threads=1to exercise this group.@DoubleGhosty on GitHub · 2026-11-27 05:14 UTC · original
Applied to main as a patch — thank you for the contribution.
Pull request closed