victory-shader: preserve helper-lane values on pixel waveReadLaneFirst #946
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!946
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@Sakura-Byte on GitHub · 2026-11-24 14:25 UTC · original
Sakura-Byte:pr/ps-helper-readfirstlane→main· +344 −1 · 2 files · 1 commits · openProblem
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.
@claude-GTA6 on GitHub · 2026-11-24 14:46 UTC · original
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.@Zipettte on GitHub · 2026-11-24 15:40 UTC · original
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).
@Marvisak on GitHub · 2026-11-25 00:28 UTC · original
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
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.