Shaders: fix ds_bpermute_b32 lane selection on Wave32 hosts #1019
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1019"
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 trustno1-coder/VIctory-NVIDIA. Originally posted by invismann on 2026-11-28T11:14:17Z.
RDNA2
ds_bpermute_b32gathers within the caller's 32-lane half and produces zero when the source lane is inactive. Treating it as a cross-half operation can reject a valid Wave64 shader on Wave32 hosts. Computing a source index across all 64 lanes can also read the wrong value.Wrap the index within the caller's half, account for active source lanes, and allow this gather in independent host Wave32 halves.
Validation
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Dukestar69 on 2026-11-28T11:44:01Z.
Review: APPROVED
Tested locally merged onto
main(63b902f).cargo xtask policypassed (294 files ok).cargo test -p victory-shader --lib emit::wave64_tests::passed (14 passed; 0 failed, including the newbackward_permute_wraps_within_its_half_and_zeros_inactive_sourcesGPU test).cargo test -p victory-shader --lib emit::tests::passed (22 passed; 0 failed; 1 ignored, includinga_backward_permute_reads_the_lane_its_address_names).cargo clippy -p victory-shader --lib -- -D warningspassed with 0 warnings.Great NVIDIA/Wave32 correctness fix for
ds_bpermute_b32lane selection and inactive-source zeroing. LGTM.Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Bj0rnis on 2026-11-28T13:29:15Z.
Independent RTX 5070 Ti 16 GB (Blackwell, Wave32 host) headless verification of
0f5e7e4(Windows 11, Ryzen 7 9800X3D, 32 GB RAM, driver621.24, Rust 1.98.1):main(63b902f).cargo test --release --locked -p victory-shader --lib -- --test-threads=1: 294 passed, 0 failed, 5 ignored (245.04 s), including the new GPU readback regressionemit::wave64_tests::backward_permute_wraps_within_its_half_and_zeros_inactive_sources(ok) and all otherwave64_testson Blackwell Wave32.victory.exe shaders,VICTORY_HOST_WAVE=32):25,760translated /225failed (92 s) — matchesmain(63b902f) with 0 regressions.cargo xtask policy: 294 files ok;cargo build --release --locked -p victorysucceeded cleanly.Not tested: live gameplay workload. No game data, shader hashes, logs, or captures attached.
AI-assisted test run and summary.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by Exopus-0x65f7ad0 on 2026-11-28T13:39:49Z.
On a second NVIDIA architecture: RTX 5060 Ti 8 GB (Blackwell,
10de:2d04), Windows 11 26300, native D3D12.63b902f+ this PR.cargo test --release --locked -p victory-shader --lib backward_permute_wraps_within_its_half_and_zeros_inactive_sources→ passed.The GPU readbacks you ran on the 4090 aren't in the PR, so I couldn't repeat those. If you push the readback test (even
#[ignore]), I'll run it on this Blackwell card.Pull request closed