Shaders: fix ds_bpermute_b32 lane selection on Wave32 hosts #1019
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1019
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@invismann on GitHub · 2026-11-28 11:14 UTC · original
invismann:fix/shader-backward-permute-wave32→main· +14765 −360 · 45 files · 78 commits · closed without mergingRDNA2
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
@Dukestar69 on GitHub · 2026-11-28 11:44 UTC · original · approved these changes
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).
@Bj0rnis on GitHub · 2026-11-28 13:29 UTC · original
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.
@Exopus-0x65f7ad0 on GitHub · 2026-11-28 13:39 UTC · original
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