Shaders: hardware test for v_mul_lo_u32, v_mul_hi_u32 and v_mul_hi_i32 #1378
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1378"
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 LouisRiverstone on 2026-11-24T17:39:55Z.
v_mul_lo_u32,v_mul_hi_u32andv_mul_hi_i32(VOP3 0x169, 0x16a, 0x16c) had no hardware test; the high halves go through themul_hihelper inlower.rs.New test
v_mul_lo_and_v_mul_hi_match_rdna2runs all 49 ordered pairs of seven values (0, 1, 16-bit edges and the 32-bit sign boundary) through each opcode. Expected values come fromwrapping_muland 64-bit products in Rust, unsigned and signed.Test only, no production change.
Verify:
cargo test -p victory-shader v_mul_lo_and_v_mul_hi(Windows, hardware GPU or WARP). I type-checked it with clippy forx86_64-pc-windows-msvc, but could not run it locally: the shader test module is Windows-only.🤖 Generated with Claude Code
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T17:52:26Z.
Review: APPROVED
Hardware test only: v_mul_lo_u32/v_mul_hi_u32/v_mul_hi_i32 (VOP3 0x169/0x16a/0x16c). High-half formulas use u64/i64 products >> 32 — correct for both signednesses; edge values include 0x8000_0000 and 0xFFFF_FFFF. Windows-only execution. Local verification: macOS arm64, rustc 1.98.1, PR head merged into main
ffe310e,cargo test -p victory-shader --locked. Shader execution tests (valu_tests/host/diff_tests) are#[cfg(all(test, windows))], so macOS covers lowering/decode/unit tests only. 96 passed, 0 failed.Imported from Marvisak/VIctory. Originally posted by nullmarsh on 2026-11-24T18:00:49Z.
Ran on RDNA2 hardware through vkd3d-proton on a Steam Deck (not native Windows): AMD Van Gogh, RADV 26.1.99, SteamOS 3.8.28, Proton 11.0-3 (wine-11.0) with its vkd3d-proton 212991fc. Windows MSVC test binary (rustc 1.100.0) built from head
5c6dea3on mainffe310e.v_mul_lo_and_v_mul_hi_match_rdna2passes: v_mul_lo_u32, v_mul_hi_u32 and v_mul_hi_i32 on all 49 pairs of {0, 1, 0xFFFF, 0x10000, 0x7FFFFFFF, 0x80000000, 0xFFFFFFFF}.stub_pipeline_is_created, fails on main too (likely vkd3d-proton accepting the zero DXIL digest the test expects refused; environment, not this PR).Not tested: native Windows AMD drivers; WARP (this setup has none, so the WARP leg ran on RADV too).
AI-assisted (Claude Code, Claude Opus 5.5); no game data.
Imported from Marvisak/VIctory. Originally posted by marquezinii on 2026-11-24T19:13:04Z.
Native Windows NVIDIA data point: RTX 5070 (desktop, driver 621.40, the only adapter), Windows 11 26300, Rust 1.98.1, head
5c6dea3.cargo test -p victory-shader --lib -- --test-threads=1 --nocapturegives 121 passed, 0 failed, 1 ignored.v_mul_lo_and_v_mul_hi_match_rdna2passes on the hardware adapter and WARP, with nothing skipped on the hardware adapter.Imported from Marvisak/VIctory. Originally posted by wwwwwwww3333333 on 2026-11-24T19:13:23Z.
Native Windows run on AMD RDNA2: RX 6750 XT (RDNA2, gfx1031), AMD driver 32.0.21045.29003, i5-13400F, Windows 11, Rust 1.98.1 MSVC. Head
5c6dea3on mainffe310e(clean merge).cargo test -p victory-shader --lib -- --test-threads=1: 121 passed, 0 failed, 1 ignored (main alone: 120 passed).v_mul_lo_and_v_mul_hi_match_rdna2ran on the hardware adapter and then on WARP, and passed on both. The earlier RDNA2 runs on this PR went through vkd3d-proton on Linux; this one is AMD's own D3D12 driver.Synthetic tests only, no game files. AI-assisted (Claude picked the PRs and wrote the batch script; I ran it on my machine).
Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:39:11Z.
Automated triage for the maintainers. Closing because this change is already in
main, ormainhas since replaced the code it patches.v_mul_lo_u32, v_mul_hi_u32 and v_mul_hi_i32 (0x169, 0x16A, 0x16C) are already probed in main's semantics_tests.rs
integer_probesover 34x34 edge pairs.If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed