shader: lower v_permlane16_b32 and v_permlanex16_b32 #30
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!30
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/30/head"
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?
@claytonblythe on GitHub · 2026-11-26 10:13 UTC · original
claytonblythe:feat/shader-v-permlane16→main· +97 −5 · 3 files · 2 commits · merged 2026-11-26 10:20 UTCSummary
During Story Mode world loading (frame 2788 in
--console series-s), two compute shaders were refused withGFX10 code: v_permlane16_b32 is not supported.This change adds support for
v_permlane16_b32(and general VALU lowering forv_permlanex16_b32outside whole-wave sections):crates/victory-shader/src/emit/wave.rs: handlesv_permlane16_b32alongsidev_permlanex16_b32in whole-wave reduction simulation (same 16-lane row vs cross-row in the same 32-lane half).crates/victory-shader/src/emit/lower.rs:v_permlane*as requiringconsole_lanes.v_permlane16_b32andv_permlanex16_b32invalu_opusingread_in_half(dx.op.waveReadLaneAt), since both stay within the lane's 32-lane half and require no cross-half LDS exchange on wave32 hosts (Apple Silicon Metal).fi:0inactive-lane fallback (bound_ctrl:1→0,bound_ctrl:0→ destination's old value) viawaveActiveBallotwhen guarded.crates/victory-shader/src/emit/wave32_tests.rs: addspermlane16_and_permlanex16_lower_within_host32_halfverifying wave32 lowering with 0 exchange barriers.Verification
cargo test -p victory-shader --lib— 216 passed, 0 failed.cargo clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -- -D warnings— 0 warnings.cargo xtask policy— 363 files ok.@LakshanSivakumar on GitHub · 2026-11-26 10:17 UTC · original · approved these changes
Reviewed and tested on top of current main together with #29: all tests including the new wave32 permlane test, clippy (Windows target) and policy pass. The row/nibble selection matches the ISA (lanes 8-15 take src2's nibbles), and FI/bound_ctrl map to op_sel[0]/[1] as expected. Follow-up when convenient: a value-level test (e.g. a WARP compute run on Windows CI) for the inactive-lane fallback would be nice, since the current test only checks the lowering.
@claytonblythe on GitHub · 2026-11-26 10:19 UTC · original
Live-tested on a 16 GB Apple M4 (
--console series-s,--headless,VICTORY_GUESS_GRAPHICS=1) on top oforigin/main(a2940ab) + PRs #25/#28:v_permlane16_b32compute shaders at frame 2788 now translate and compile on Metal).recorded=16593 encoded=16593 no_pipeline=0 no_texture=0).