Test Wave32 spilled lane masks at control-flow joins #1784
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!1784
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1784"
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?
@rezioliver-collab on GitHub · 2026-11-24 22:30 UTC · original
talleyrand222:test/wave32-spilled-mask-join-main→main· +106 −2 · 1 files · 1 commits · openmainalready tracks a Wave32 lane mask spilled to a VGPR lane and read back. Its unit test checks the restored mask in the structuring pass. This PR adds a Windows D3D12 regression for what happens when a uniform branch chooses between that restored mask and a different mask computed on the other path. Existing spill-tracking test onmainThe synthetic shader dispatches one 64-thread group spanning two Wave32 waves. The restored mask selects thread IDs below 40. The direct mask selects IDs below 24. Each selected thread writes
5and every other thread writes1to its own slot in a zeroed buffer, so the readback catches a wrong mask or a missing store.Verification
940d32f, the Windows SDK DXIL validator (1.8.2502.11) accepted the shader. An RTX 5080 returned all 64 expected values for each selector. The local WARP adapter reported no Wave32 support and skipped dispatch.a lane-mask join of an untracked mask, the same error seen onffe310ebefore spill tracking landed.Full local Windows workspace tests
The unmodified
mainrun had 696 passing tests, 5 failures and 10 ignored tests. The rebased branch had 697 passing tests, the same 5 failures and 10 ignored tests. The added pass waswave32_spilled_mask_at_join.descriptor::host::tests::dynamic_slots_are_held_until_releasedemit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_strideemit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zerosemit::synthetic_tests::gathers_at_a_level_match_the_hardwarememory::tests::lists_share_a_table_and_copies_keep_their_viewsAI-assisted with OpenAI Codex.
@DesertGamer on GitHub · 2026-11-24 22:34 UTC · original
VIctory V2: community PRs, merged and tested
Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.
Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).
⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.
Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2
Unofficial community fork of Marvisak/VIctory, GPL-3.0.
@Marvisak on GitHub · 2026-11-25 01:36 UTC · original · edited 2026-11-25 15:24 UTC
Automated triage for the maintainers.
Merge candidate (worth a look). Now that it merges cleanly: this adds
wave32_spilled_mask_at_jointoemit/valu_tests.rs, a 64-thread Wave32 compute shader where a uniform branch joins a lane mask restored byv_readlane_b32with one computed directly, reading each thread's output back for both branch selectors. I checked the hand-encoded instructions (v_cmp_gt_u32,v_writelane/v_readlane, thes_cmp_eq_u32/s_cbranch_scc0/s_branchoffsets,s_and_saveexec_b32,s_or_b32,v_lshlrev_b32, the MUBUFoffenbits): branch targets and expected values match. Lowering runs unconditionally, so CI exercises thelower.rslane-mask join path even without a GPU. The smalltry_lower_valu_csrefactor leaves the existing helper's behaviour unchanged. CI: passing.Generated by Claude Code
@catminou4 on GitHub · 2026-11-24 23:04 UTC · original · approved these changes
Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (
70564ae), cargo test -p victory-shader --locked → 118 passed, 0 failed. GPU execution tests (valu_tests/host) are #[cfg(all(test, windows))] and run only on Windows; macOS covers lowering/structure unit tests.Wave32 spilled lane masks at control-flow joins: wave32_spilled_mask_at_join lowers through try_lower_valu_cs. +2 macOS tests.
@fuzeofficlal on GitHub · 2026-11-26 19:13 UTC · original · approved these changes
Verified locally merged onto
origin/main(63bcca43, Windows 11 x64, Rust 1.98.1 MSVC, RTX 5090 & WARP):cargo test --locked -p victory-shader --lib wave32_spilled_mask_at_join(VICTORY_WARP=0) — 1 passed, 0 failed (hardware: branch 0, all 64 thread values matchedandhardware: branch 1, all 64 thread values matched; WARP skips GPU readback as Wave32 is unavailable)cargo test --locked -p victory-shader --lib wave32_spilled_mask_at_join(VICTORY_WARP=1) — 1 passed, 0 failed (lowering runs; GPU readback skips cleanly without Wave32)cargo clippy --locked -p victory-shader --all-targets -- -D warnings(default and--all-features) — 0 warningscargo xtask policy— ok (191 files ok)Review notes
0xBF84_0003,0xBF82_0001): the test spillss6(thread ID < 40) viav_writelane_b32intov20lane 1, restores it viav_readlane_b32intos12on one arm of thes0 == 0uniform branch, joins withs14(thread ID < 24) on the other arm, and verifies all 64 threads across two Wave32 waves.wave32_spilled_mask_at_join(valu_tests.rs:321) uses[("hardware", false), ("WARP", true)], which can switch toHost::test_backends()once #2225 lands.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.