Shaders: allow half-local DPP in divergent Wave64 Emulate (FIND-7) #3200
No reviewers
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory!3200
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@makmatvey on GitHub · 2026-11-26 12:23 UTC · original
makmatvey:cursor/shader-find7-half-local-divergent-673e→main· +5131 −611 · 19 files · 20 commits · openStacked 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.
@Dukestar69 on GitHub · 2026-11-26 12:28 UTC · original · reviewed
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).
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.