Track divergent re-entry into shader loop exits #832
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/fxceless--victory-fork!832
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/832/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?
@Kamiloj9 on GitHub · 2026-11-25 09:47 UTC · original
Kamiloj9:codex/shader-loop-convergence→main· +22 −1 · 1 files · 1 commits · closed without mergingChange
Treat a divergent branch's own block as part of its divergent region when a loop can reach it again before lanes reconverge. This lets split-wave lowering account for the later dynamic instances of a group barrier in that block.
Verification
@avt0m4t48 on GitHub · 2026-11-25 11:15 UTC · original
I independently checked
fd6ac9eceaddae60b5d26fe60c69abba0a6ea1caagainst its parent9376fd60c0ba0e76a74c39b49b1407dbac0a64c7with four original synthetic GFX10 control-flow fixtures.The multi-block loop used the words
be880380 7d880000 bf870001 bf810000 be890381 bf82fffb. On the parent, the VCC branch at byte 4 was classified as all-lane even though its taken arm loops back through a separate block. The PR classifies the revisited branch as divergent. It also identifies that branch for wave-wide retry, and classifies it as all-lane when explicitly widened. Three controls passed on both revisions: an acyclic lane split, a lane split that reconverges before a uniform loop backedge, and a uniform split with a separate loop body.The untouched PR head passed the Linux shader library suite (172 passed, 2 ignored) and
cargo check --offline --locked -p victory-shader --tests --target x86_64-pc-windows-msvcwith Rust 1.98.1. The advertised main had identical shader and Cargo build inputs to the parent for these checks. Scope was CPU classification and Windows-target compilation. I used no game files and did not run Windows, a GPU, or a DXIL validator.AI-assisted using Codex.
@MamaLeVrai on GitHub · 2026-11-25 12:23 UTC · original · edited 2026-11-25 12:51 UTC
Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head
fd6ac9eintomainf85101bin a throwaway tree (no conflict).cargo clippy --workspace --all-targets --locked -- -D warningsfails with the errorsmainitself has on this machine (placed_filler_twins,depth_written, a sort, andmanual implementation of .is_multiple_of()atvictory-gpu/src/shadow.rs:2675; PR #841 fixes the first three), also with--all-features; this PR adds none. (Correction: my first version of this report said that theis_multiple_ofone was extra here. It is inmaintoo: my first baseline run ofmaindid not list it, and a run with--keep-goingon a cleanmaindoes.)cargo test --workspace --locked: run 1: 566 passed, 0 failed, 12 ignored; run 2: stopped atindirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields(the one that fails onmainitself most runs here (PR #849 and #847 fix its assertion)) and thevictory-gputest binary died with an access violation (it does that onmainabout 2 runs in 100, issue #850) (mainalone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data.AI-assisted (Claude Code); no game data.
Pull request closed