Shaders: lower ds_wrxchg2_rtn_b32 and ds_wrxchg2st64_rtn_b32 in pure 32-bit DXIL #2117
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2119"
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 geiyiliyabumo on 2026-11-25T05:25:14Z.
Summary
ds_wrxchg2_rtn_b32(0x02e) andds_wrxchg2st64_rtn_b32(0x02f) incrates/victory-shader/src/emit/lower.rs(fn ds) to two ordered,EXEC-guarded pure 32-bitRmw::Xchgatomics without enablingInt64/WIDE_OPS.ds_wrxchg2_rtn_b32) and 256-byte (ds_wrxchg2st64_rtn_b32) offset scaling, reads all source VGPRs before writingvdst[0:1](handling source/destination overlap safely), and preserves bothvdst[0]andvdst[1]on inactiveEXEClanes.crates/victory-shader/src/emit/semantics_tests.rscovering distinct offsets, equal offsets (offset0 == offset1), 256-bytest64stride, source/destination VGPR overlap, inactiveEXEClane preservation, and assertingInt64is not set.Verification
cargo xtask policy: passedcargo clippy -p victory-shader --tests -- -D warnings: passedcargo test -p victory-shader --lib lds_exchange_pair -- --test-threads=1with Microsoftdxil.dll: passed on AMD Radeon RX 9060 XT (RDNA4) and Microsoft Basic Render Driver (WARP) (192 lane results, 0 hardware/WARP mismatches)Imported from Marvisak/VIctory. Originally posted by upipibi on 2026-11-25T05:36:48Z.
Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at
85fe4dc.victory-shader: 246 passed, 3 failed, 3 ignored. The newlds_exchange_pair_ir_and_dxilandlds_exchange_pair_matches_isapass. The 3 failures are #1744's NVIDIA failures onmain. Same asmainon this hardware.Overlap, from reading: #1606 (open, conflicting with
main) also lowerswrxchg2_b32andwrxchg2st64_b32among the other LDS atomics.AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T06:40:55Z.
Review: APPROVED
Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main
940d32f69b,cargo test -p victory-shader --locked.144 passed / 0 failed / 2 ignored. ds_wrxchg2_rtn_b32 and ds_wrxchg2st64_rtn_b32 lowered — wave-wide exchange-and-return atomics.
Imported from Marvisak/VIctory. Originally posted by sinan-cmyk on 2026-11-25T10:16:14Z.
Offline measurement on a retail dump
Result: no count change against
main.I merged head
85fe4dc1ontomain940d32f(clean merge) and ranvictory translate --validate --listonshaders.rpf(1.0.2.1), with dxil.dll 1.8.2502.11. I compared the result withmainprogram by program (25,889 programs). Validated: 23,918 onmain, 23,918 with this PR.No program changes its failure reason. The count shows that the change rejects nothing on this data. It does not show whether the output is right.
No shader names or data are included, per the asset policy. AI-assisted (Claude Code).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T10:45:46Z.
Automated triage for the maintainers.
Needs rebase. This PR no longer merges cleanly into
main:mainhas moved since the last triage, and the branch now conflicts incrates/victory-shader/src/emit/semantics_tests.rs. It will be reviewed again once it is rebased onto currentmain.Previous verdict for this head: merge candidate.
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.