Shaders: mask lane selectors to the console wave width #3917
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3917"
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 faycalbaklouti on 2026-11-30T23:01:54Z.
What
Use the low five selector bits for guest Wave32 and the low six for guest Wave64 in read-lane and write-lane lowering, resource tracing, and scalar spill recovery. A write to lane 32 must overwrite lane 0 in Wave32, but not in Wave64. The new test exercises both cases using synthetic instructions.
How it was tested
Windows MSVC target under Wine:
cargo xwin test --locked --target x86_64-pc-windows-msvc -p <package> --lib --no-fail-fastfor each suite, adding-- --exact <name> --nocapture --test-threads=1for the regressions. Compared3aeb893dcdwith clean base63bcca43c6.The same 88 shader tests failed by name and diagnostic on head and base: the CPU-only Wine runner has no D3D12 Shader Model 6.6 device or WARP fallback. Zero matches on the clean base are expected for newly added tests. With only the test hunks applied to base, the regression assertions failed as expected.
Both workspace Clippy modes (default and all features, with
-D warnings) exited 0 on head and base. The Windows-target workspace test under Wine exited 101 on both, stopping invictory-hle:modules::net::tests::only_loopback_is_reachablehit a missingWSAConnectByListexport on the isolated runner, andmodules::xgamesave::tests::a_kept_blob_past_the_link_limit_is_copieddid not observe the expected NTFS hard-link limit. Native Windows CI remains the final gate.Radicle project hub (open-source porting and preservation history): https://radicle.network/nodes/rosa.radicle.network/rad:z3rqQw7796wMbgj8RszExtWR4wMSE
Live development stream: https://vdo.ninja/?view=gta6rtx4090live1080p60
Imported from Marvisak/VIctory. Originally posted by passerbyyhx on 2026-11-30T23:42:37Z.
Native Windows MSVC comparison of
3aeb893dcdd5cb0db10f389b95a01c8e5ddc3ac3and parent63bcca43c6a00a758510398fa43096ce7e4f7df0:v_readlane_b32andv_writelane_b32. The parent wrote the correct target in 4/11 cases. For 32, 33, 63, 64, 65,0x8000001fand0xffffffff, no lane received the marker. The head wrote exactly one correct lane in all 11. Reads were correct on both revisions on this GPU.& 31(Wave32) or& 63(Wave64) on the head. The parent used the raw selector. The RTX rejected fixed Wave64. Intel UHD reported 16/16 and WARP 4/4. Both rejected fixed Wave32 and Wave64 before dispatch on both revisions, so there is no native Wave64 readback in this comparison.For the unmodified
victory-shaderlibrary, all 305 common tests had the same status on the two revisions. The added structure test passed. The unfiltered process terminated on the same heap-mark test in both builds, so I restarted tests by module and accounted for every registered name:Eleven passing tests on each revision reported skipping all or part of a check. The three common Rust failures were the two
emit::stride_testsabout heap-buffer stride/empty views andgathers_at_a_level_match_the_hardware.heap_direct_texture_reads_mark_their_heap_indexalso exited with0xC0000005when run by itself on both revisions. The same test was previously reported on NVIDIA main.Imported from Marvisak/VIctory. Originally posted by faycalbaklouti on 2026-12-01T00:54:21Z.
Thanks, @passerbyyhx, for the native check and the tracer test. I ran your test here too (Windows MSVC target under Wine): with only the test on
63bcca43it fails atresource.rs:2394(wave64=false, writes=0,32, read=0), and on this branch it passes. I've pulled your commit into this PR as-is, so it keeps your authorship.Imported from Marvisak/VIctory. Originally posted by cloph-dsp on 2026-12-01T13:25:56Z.
Verification (independent, AI-assisted: Hy4 flash). Windows, Rust 1.100.0 (Scoop rust-msvc), MSVC, commit-scoped shallow worktree.
Base
63bcca43c6a00a758510398fa43096ce7e4f7df0, headab1ad6ff34a66d956fdd4d398d3d1ad4fd6c1431.git diff --numstat→ 3 files +67/-5.Both tests are new on the base:
→ no match, exit 1 for each.
git diff --check "63bcca43..ab1ad6ff"→ no output, exit 0.Result, each:
running 1 test,test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 306 filtered out.Both tests build the wave/lane inputs themselves; no title data, no GPU device, GPU/driver N/A. No game data.
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.