fix(victory-shader): use console lane for DPP row_mask in split wave64-on-wave32 #297
No reviewers
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX!297
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-297"
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?
@mauroalvare on GitHub · 2026-11-26 01:47 UTC · original
mauroalvare:fix/victory-wave64-dpp-row-mask→main· +145 −1 · 3 files · 4 commits · openChange
In VIctory's RDNA2-to-DXIL translator (
third_party/victory/crates/victory-shader/src/emit/lower.rs), DPP16row_maskcheckedself.console_lane()only in the paired form (self.twin.is_some()), falling back to the 0..31 host lane index (waveGetLaneIndex) in split wave64-on-wave32 compute shaders (self.halves.is_some()orself.exchange.is_some()— the default lowering on 32-lane hosts such as NVIDIA GPUs when DPP does not cross 32-lane halves or uses LDS exchange). Furthermore,console_lane()itself returnedlane_index()wheneverself.exchange.is_none() && self.twin.is_none(), ignoringself.halves.is_some().As a result, the upper host wave (console lanes 32..63, DPP rows 2 and 3) tested
row_maskbits 0 and 1 instead of bits 2 and 3, silently skipping enabled row-2/3 lanes and overwriting masked ones.Fix:
self.halves.is_some()inLower::console_lane()andLower::lane_bit().self.console_lane()for DPProw_maskwheneverself.exchange.is_some() || self.halves.is_some() || self.twin.is_some().Linked issue: Refs #213
Verification
Base SHA:
c4c93bdc413191a9dc909998d2d53080a3f0c880(LooperSalty/AnyXboxX:main)Hardware: Windows 11, Ryzen 7 9700X, NVIDIA GeForce RTX 5070 Ti (driver
621.40),dxil.dll10.0.26100.0, Rust1.98.1(MSVC).Before the fix (failing on base
c4c93bdon RTX 5070 Ti):After the fix (from
third_party/victory):Oracle and test data
The new regression test
wave64_dpp_row_mask_uses_console_rows_in_split_32_lane_wavesinthird_party/victory/crates/victory-shader/src/emit/wave64_tests.rssynthesizes two 64-thread GFX10 wave64 compute shaders (one withhalvesonly, one withhalves+exchangevias_bcnt1_i32_b64) executingv_mov_b32 v4, v1 row_shr:1 row_mask:0x6 bank_mask:0xf. Both are validated withdxil.dlland executed on the RTX 5070 Ti, checking all 64 lanes (256 dwords) against RDNA 2 ISA semantics.No game, console, or SDK files were used.
Checklist
E_NOTIMPL), never a fake success.AI assistance: investigated, implemented, tested on RTX 5070 Ti, and drafted with Antigravity (Gemini).
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.