fix(victory-shader): enforce inactive-lane EXEC rules for DPP16 and DPP8 #435
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!435
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-435"
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 18:44 UTC · original
mauroalvare:fix/victory-dpp-inactive-exec→main· +407 −133 · 4 files · 4 commits · openChange
In VIctory's RDNA2-to-DXIL translator (
third_party/victory/crates/victory-shader/src/emit/lower.rs),Lower::dppignoredfi(fetch-inactive) and the source lane'sEXECactivity for both DPP16 (Dpp::Row) and DPP8 (Dpp::Lanes), and passed out-of-bounds lane indices (e.g.0xFFFF_FFFFonrow_shrlane 0, or>= wave_sizeonrow_shllane 31) directly towaveReadLaneAt.Under AMD RDNA 2 ISA semantics, unless
fi:1is set, reading an inactive source lane (EXEC == 0) must:0whenbound_ctrl:1(DPP16), orvdstunmodified whenbound_ctrl:0(DPP16 and DPP80xE9).On 32-lane NVIDIA hosts this broke both guarded wave32 / divergent wave32 shaders and paired wave64 compute shaders (where every divergent branch is lowered wave-wide with
EXECas a per-lane guard, so all host lanes stay physically active andwaveReadLaneAtsilently read stale inactive-lane VGPRs).Fix:
lanebeforewaveReadLaneAt/quad_pick.!fi, check source-lane activity viawaveActiveBallot(guard.unwrap_or(true))(orquad_pick(guard)for mesh quads), covering both guarded blocks (including paired wave64) and divergent branches (guard == None).insideandsrc_activeintovalid: substitute0ifbound_ctrlis set, or gate the destination write otherwise.Linked issue: none
Verification
Base SHA:
c3cc02932fc596ee9d937e5743f73007c538365a(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
c3cc029on RTX 5070 Ti):After the fix (from
third_party/victory):Oracle and test data
The new regression test
dpp16_and_dpp8_honor_inactive_source_lanes_and_fiinthird_party/victory/crates/victory-shader/src/emit/wave64_tests.rssynthesizes three minimal GFX10 compute shaders (guarded wave32, divergent-branch wave32, and paired wave64 on a 32-lane host) withEXECnarrowed to even lanes, executing DPP16quad_perm:[1,0,3,2](bound_ctrl:0 fi:0,bound_ctrl:1 fi:0,bound_ctrl:0 fi:1), DPP8dpp8:[1,0,3,2,5,4,7,6](fi:0), and DPP16quad_perm:[2,3,0,1](reading an active even lane). All shaders are validated withdxil.dlland checked dword-for-dword on RTX 5070 Ti against AMD RDNA 2 ISA semantics (matchingPrototypeScarlett/emu/rdna2_exec_ext.py).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).
d46815d06ftod29015283f774299d345to721c3209dd@mauroalvare on GitHub · 2026-11-26 23:37 UTC · original
The Vice-Tay port is up in
721c320. The DPP16 and DPP8 GPU regression passed for guarded and branched wave32 and for split wave64, covering inactive EXEC lanes,bound_ctrl, andfi. The asset-policy check passed too.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.