Repository navigation
Shaders: hardware test for the 24-bit v_mul and v_mad forms - #1377
LouisRiverstone wants to merge 1 commit into
Conversation
catminou4
left a comment
There was a problem hiding this comment.
Hardware test only: v_mul/v_mad 24-bit forms (VOP2 0x0b/0x09, VOP3 0x10b/0x109, mad 0x143/0x142). The i24 sign-extension ((a << 8) as i32) >> 8 matches the ISA's sign-extend-from-bit-23, and the u24 mask is correct; 49-case sweep covers the 0x80_0000/0xFF_FFFF edges. 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.
|
First GPU run of this PR's test that I could find, on an AMD GPU under Proton on Linux:
This is RADV, not AMD's Windows driver, so it adds to a Windows run rather than replacing it. Synthetic tests only, no game files. AI-assisted (Claude Code, Opus 5.5); every run was on this machine. |
|
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 c6ce95a on main ffe310e (clean merge).
Synthetic tests only, no game files. AI-assisted (Claude picked the PRs and wrote the batch script; I ran it on my machine). |
|
Automated triage for the maintainers. Closing because this change is already in The 24-bit multiplies are already probed in main: semantics_tests.rs 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. |
v_mul_u32_u24,v_mul_i32_i24,v_mad_u32_u24andv_mad_i32_i24use only the low 24 bits of each factor (zero- or sign-extended). They are lowered inlower.rswith a shift pair per operand, but no hardware test ran them.New test
v_mul_and_v_mad_24_bit_forms_match_rdna2runs seven values around the 24-bit boundaries (0x7FFFFF,0x800000,0xFFFFFF,0x1000001, all-ones) as both factors, with addends 0 and 7 for themadforms. Expected values come from masking and sign-extending in Rust.Test only, no production change.
Verify:
cargo test -p victory-shader v_mul_and_v_mad_24(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