Shaders: allow half-local DPP in divergent Wave64 Emulate (FIND-7) #3198
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3200"
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 Marvisak/VIctory. Originally posted by makmatvey on 2026-11-26T12:23:03Z.
Stacked on #189; only the top commit belongs here. Related but separate from #3115 (that PR is the #2176 wave64-on-32-lane
cross-halfrefusal).What's wrong
Under
Wave64Mode::Emulate(#189), DPP source picks go throughexchange_64, which refuses with "a cross-lane wave operation in divergent control flow" / "a cross-lane read in divergent control flow" whenever EXEC is narrowed. DPP row/quad/DPP8 never leave a 32-lane half (#1317 H-6.3 / FIND-7), so they need no LDS barrier and should stay legal in divergent control flow. Onlyv_permlanex16, 64-widev_readlane, and 64-bit ballots really cross the halves.What the change does
crates/victory-shader/src/emit/lower.rs: in Emulate (non-mesh-quad) DPP, use host lane indices andWaveReadLaneAtinstead ofexchange_64.crates/victory-shader/src/emit/lower/wave64.rs:src_lane_active(..., half_local)uses the hostwaveActiveBallotfor half-local DPP FI=0, skipping the 64-lane ballot/barrier path.ds_swizzle/ permute paths that still need console-lane exchange keephalf_local: false.Tests
divergent_dpp_row_emits_under_wave64_emulate: divergentrow_shr:1emits under Emulate; a same-shape divergent 64-bit ballot still refuses.cargo check -p victory-shader --lockedandcargo clippy -p victory-shader --locked -- -D warningsclean on Linux.cargo test -p victory-shader --libdoes not compile on Linux on #189's base (validatoriscfg(windows)); Windows CI is the gate.cargo xtask policy: 193 files ok.Asset policy
No game data used.
Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-26T12:28:28Z.
Review: COMMENTED
Tested on Windows 11 (RTX 5090 + WARP) against
origin/main(63bcca4):cargo clippy -p victory-shader -p victory-gpu -p victory --all-targets -- -D warnings: clean.cargo xtask policy: 193 files ok.cargo test -p victory-shader --lib emit::crosslane_tests:: -- --test-threads=1: 5/5 passed on RTX 5090 and WARP.cargo test -p victory-gpu --lib shader_cache:: -- --test-threads=1: 5/5 passed.cargo test -p victory-shader --lib emit::wave64_tests:: -- --test-threads=1: 34/35 passed, 1 failed:emit::wave64_tests::gpu::gpu_128_threads_ds_swizzle_and_dpp_row_maskpassed on RTX 5090 (wave=(true, 32..=32),[Emulate, Wave32]), but failed on WARP (wave=(true, 4..=4),[Emulate]):Emulatemode assumes host wave width >= 32 (or >= 16) for half-local DPP row operations, which breaks on inbox WARP (wave=(true, 4..=4)).Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by Jackster on 2026-11-26T23:10:53Z.
Windows 11,
63bcca4+ this PR, Radeon RX 7900 XTX — one test fails here, and it is the test that fails in CI:checkjob on this PR (run 45819143235, job 139906541570), so it reproduces rather than being a CI flake.(Emulate, WARP)— the emulated path on the software adapter; the other combinations in the same run pass.63bcca4: thewave64filter matches only 5 tests, all passing, so the failing case is added by this PR.cargo clippy -p victory-shader --all-targets -- -D warnings: clean.The rest of the wave64 suite (40 tests) passes on this machine. Synthetic only. AI-assisted.
Pull request closed