victory-shader: preserve helper-lane values on pixel waveReadLaneFirst #946
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/946"
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?
Imported from Marvisak/VIctory. Originally posted by Sakura-Byte on 2026-11-24T14:25:31Z.
Problem
In pixel shaders, DXIL
waveReadLaneFirstreads the first active non-helper lane, whereas console RDNA2 WQM keeps pixel helper lanes active inEXEC. When a pixel waterfall loop guards or advances on a helper lane's descriptor or value, sharing the non-helper lane'swaveReadLaneFirstresult stalls the quad loop.Fix
dx.op.isHelperLane.i1(opcode 221) inpixel_own_if_helperand select each lane's own value whenisHelperLane()holds, gated strictly on pixel shaders inwave_read_lane_first,wave_read_first_masked, andaddress_dynamic.dxil.dllvalidation.Verification
cargo xtask policy:154 files okcargo clippy --workspace --all-targets --locked -- -D warnings: cleancargo clippy --workspace --all-targets --all-features --locked -- -D warnings: cleancargo test --workspace --locked -- --test-threads=1:344 passed; 0 failedon Windows 11 + NVIDIA GeForce RTX 5090 D & WARP (dxil.dllvalidated)AI-assisted; synthetic tests only, zero game assets.
Imported from Marvisak/VIctory. Originally posted by claude-GTA6 on 2026-11-24T14:46:09Z.
From a tester working with Claude (AI-assisted); measured on my own machine.
A data point for this change, from the same idea on my branch (@Vaximous's finding on #307; my version is claude-GTA6/VIctory
pr-helper-readfirstlane, since I can't open PRs right now). RTX 5090, GTA VI 1.0.2.1, default loop limit: pixel1af4a50c7fb40c97(a light loop that takes its counter withv_readfirstlaneand exits on a match) had 4-6 draws over 100 ms per run before, one of them 1,163 ms for 4 mesh groups; with the fix it had one. Other slow programs stayed (compute42683eebec081520, which has no helper lanes), so on my card this doesn't end the world hang alone. Runs with and without it under a loop cap of 256 both ran 15 minutes without a device removal. Not tested on AMD.Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T15:40:42Z.
Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at
c159604:cargo test -p victory-shaderpasses, 122 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).Tested with AI assistance (Claude).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:28:47Z.
Automated triage for the maintainers.
Needs rebase. This PR does not merge cleanly into current
main(ac2525d). Conflicting files:crates/victory-shader/src/emit/lower.rs.The content has not been reviewed yet; it will be once the branch is rebased onto
main.Generated by Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.