Repository navigation
Shaders: hardware test for s_min_i32/u32 and s_max_i32/u32 - #1360
LouisRiverstone wants to merge 1 commit into
Conversation
catminou4
left a comment
There was a problem hiding this comment.
Hardware test only: s_min/s_max i32/u32 across sign-bit values, SOP2 opcodes 0x06-0x09 match the ISA encoding, reference formulas are the obvious min/max. Runs on Windows hardware/WARP only; macOS just compiles it. Local verification: macOS arm64, rustc 1.98.1, PR head merged into main ffe310e, cargo test -p <crate> --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 0e24b79 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). |
catminou4
left a comment
There was a problem hiding this comment.
Tested locally on macOS arm64 (rustc 1.98.1): PR head merged cleanly into current main (ffe310e), cargo test -p victory-shader --locked → 96 passed, 0 failed. Execution/valu tests are #[cfg(all(test, windows))] and only run on Windows; macOS covers lowering/structure/IR unit tests.
Hardware test for s_min/s_max i32/u32 (SOP2 0x06..0x09) over sign-bit-differing values on every backend including WARP. Runs on Windows only (valu_tests), like the rest of that harness.
…le validation Integrated: Marvisak#1282 (fold a conditional branch to its fallthrough, with a guard so s_cbranch_cdbg* stays refused - without the guard the fold silently accepted four debug branches that effects() refuses), Marvisak#1360 and Marvisak#1362 (hardware tests for s_min/s_max and s_lshl_add), Marvisak#1490 (freed XMem page numbers are reused instead of growing the pool), Marvisak#1607 (1D textures accept only GFX10 1D swizzle modes rather than computing a size from an invalid layout). Refused: Marvisak#1523 (withdrawn by its author; three NVIDIA GPUs all cap at exactly 1,000,000). Duplicate: Marvisak#512. Gate at c7c2a72: fmt 0 differing, both Clippy gates 0 errors, policy 219 files, workspace 685 passed / 0 failed with the 10 documented GPU skips. One earlier run in this session reported a single failure that did not reproduce in a full re-run; it is recorded as unreproduced rather than dismissed.
|
Automated triage for the maintainers. Closing because this change is already in s_min/s_max_i32/u32 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. |
s_min_i32,s_min_u32,s_max_i32ands_max_u32(SOP2 0x06..0x09) are lowered inlower.rsbut no hardware test ran them. Only the predicate (SLT/SGTagainstIULT/IUGT) separates the signed forms from the unsigned ones.New test
s_min_and_s_max_compare_signed_and_unsignedruns all 36 ordered pairs of{0, 1, 5, 0x7FFFFFFF, 0x80000000, 0xFFFFFFFF}through each opcode. The sign bit is set on some values so the signed and unsigned answers differ. Expected values come frommin/maxin Rust.Test only, no production change.
Verify:
cargo test -p victory-shader s_min_and_s_max(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