Test Wave32 spilled lane masks at control-flow joins #1783
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/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?
Imported from Marvisak/VIctory. Originally posted by rezioliver-collab on 2026-11-24T22:30:04Z.
mainalready 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.
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T23:04:14Z.
Review: APPROVED
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.
Imported from Marvisak/VIctory. Originally posted by DesertGamer on 2026-11-24T22:34:33Z.
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.
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:36:10Z.
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
upstream-sync referenced this pull request2026-11-25 11:05:34 +00:00
amdxc64.dllwhile a translated compute pipeline is created #2515Imported from Marvisak/VIctory. Originally posted by fuzeofficlal on 2026-11-26T19:13:06Z.
Review: APPROVED
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.Imported from Marvisak/VIctory. Originally posted by Dukestar69 on 2026-11-27T00:29:06Z.
Review: APPROVED
LGTM — verified on Windows (RTX 5090 + WARP):
cargo test -p victory-shader --lib wave32_spilled_mask_at_join -- --nocapturepassed on RTX 5090 hardware (bothbranch 0andbranch 1matched all 64 thread values across two Wave32 waves; WARP skipped cleanly due to Wave32 unavailability)cargo clippy -p victory-shader --all-targets -- -D warningspassed with 0 warningscargo xtask policypassed (191 files ok)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.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.