fix: keep wave64 ds_bpermute within each 32-lane half #334
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!334
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-334"
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 04:02 UTC · original
mauroalvare:codex/victory-bpermute-half→main· +61 −77 · 3 files · 1 commits · openChange
Neptune treated
ds_bpermute_b32as a whole-wave read. On a 32-lane host, its paired lowering could fetch the matching lane of the other simulated half. The compute pipeline built bytools/lancer_victory.ps1reaches this lowering throughvictory_shader::emit::translate.Use address bits 6:2 as the index within the current 32-lane half. On a native wave64 host, add the caller's half base. On a wave32 host, each paired half uses the same half-local lowering, and the normal split path can handle this instruction without an inter-half exchange. This adapts the native half-mask change from VIctory #573 to Neptune's ordinary and paired forms.
Verification
Base
c4c93bdc413191a9dc909998d2d53080a3f0c880, fixecbb041708703a72413263b5249a260b0c90e394.From
third_party/victoryon Windows:0x1instead of the interpreter's0x21. The test failed at readback.(1, 33),(31, 63), and(0, 32)respectively, including the address wrap after adding the instruction's byte offset.VICTORY_WARP=1validated both DXIL containers, then skipped execution when the Microsoft Basic Render Driver rejected theWaveSize(32)compute pipeline.cargo test --locked --offline -j 2 -p victory-shader --lib paired_lanes_permute_shift_and_write_lanes_of_both_halves -- --nocapture --test-threads=1cargo test --locked --offline -j 2 -p victory-shader -- --nocapture --test-threads=1cargo test --locked --offline -j 2 -p victory-loader --test load_probecargo check --locked --offline -j 2 -p victorycargo xtask policycargo build --release --locked --offline -j 2 --manifest-path rust/Cargo.tomlcargo test --release --locked --offline -j 2 --manifest-path rust/Cargo.tomlpython -m pytest -rspython -m ruff check --select W605,F,E9 PrototypeScarlett tests toolsThe full shader run also reported four optional compiler-dependent skips, one WARP pipeline skip, and one hardware wave case whose pipeline the device did not accept. The targeted RTX regression ran both forms without skips. Pytest used Python 3.13.15,
ANYXBOXX_REQUIRE_RUNTIME=1, and the existing native runtime and TomBox binaries.Oracle and test data
The synthetic compute shader has 64 active console lanes. Each lane contributes its lane index as data, reads with
ds_bpermute_b32at a byte address plus offset 4, and stores the result to a raw UAV. The in-tree Python interpreter ran the same instruction and addresses independently. The half-wave indexing and wrap rule is specified in section 10.4.4 of the AMD RDNA 2 ISA guide.Checklist
THIRD_PARTY.mdand the commit.AI assistance by Codex for the port, regression, and Windows validation.
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.