Shaders: hardware test for the integer v_min3/v_max3/v_med3 #1052

Manually merged
github merged 2 commits from gh-pr/1052/head into gh-pr/1052/base 2026-11-26 04:18:29 +00:00
Owner

@⁠LouisRiverstone on GitHub · 2026-11-24 15:17 UTC · original
LouisRiverstone:shaders/int-min3-max3-med3-test → main · +46 −0 · 1 files · 2 commits · merged 2026-11-25 00:21 UTC

Fixes #800.

v_min3_i32, v_min3_u32, v_max3_i32, v_max3_u32, v_med3_i32 and v_med3_u32 (VOP3 0x152, 0x153, 0x155, 0x156, 0x158, 0x159) had no hardware test. Only the predicate (SLT/SGT against IULT/IUGT) separates them from the float forms.

New test v_min3_max3_med3_integer_forms_match_rdna2 runs all 125 ordered triples of {0, 1, 0x7FFFFFFF, 0x80000000, 0xFFFFFFFF} through each opcode. The set puts the sign bit on some values so the signed and unsigned answers differ. Expected values come from min/max/sort in Rust.

Test only, no production change.

Verify: cargo test -p victory-shader v_min3_max3_med3_integer (Windows, hardware GPU or WARP). I type-checked it with cargo check --target x86_64-pc-windows-msvc, but could not run it locally.

🤖 Generated with Claude Code

**@⁠LouisRiverstone** on GitHub · 2026-11-24 15:17 UTC · [original](https://github.com/Marvisak/VIctory/pull/1052) `LouisRiverstone:shaders/int-min3-max3-med3-test` → `main` · +46 −0 · 1 files · 2 commits · merged 2026-11-25 00:21 UTC Fixes #800. `v_min3_i32`, `v_min3_u32`, `v_max3_i32`, `v_max3_u32`, `v_med3_i32` and `v_med3_u32` (VOP3 0x152, 0x153, 0x155, 0x156, 0x158, 0x159) had no hardware test. Only the predicate (`SLT`/`SGT` against `IULT`/`IUGT`) separates them from the float forms. New test `v_min3_max3_med3_integer_forms_match_rdna2` runs all 125 ordered triples of `{0, 1, 0x7FFFFFFF, 0x80000000, 0xFFFFFFFF}` through each opcode. The set puts the sign bit on some values so the signed and unsigned answers differ. Expected values come from `min`/`max`/sort in Rust. Test only, no production change. **Verify:** `cargo test -p victory-shader v_min3_max3_med3_integer` (Windows, hardware GPU or WARP). I type-checked it with `cargo check --target x86_64-pc-windows-msvc`, but could not run it locally. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:18:27 +00:00
github manually merged commit 41b2472e13 into gh-pr/1052/base 2026-11-26 04:18:29 +00:00
Author
Owner

@⁠ThomasHFWright on GitHub · 2026-11-24 15:27 UTC · original

Independent Linux/Wine hardware run of 8610ffb85baedbc7b8c4c9de1222b0911e00e589 on base ffe310e: the changed regression passes, exercising 750 checks: all 125 ordered triples for each of six signed/unsigned min3/max3/med3 operations. Built and run from this PR alone, without instrumentation changes.

Rust 1.98.1, Windows MSVC target, Wine 11.22, RTX 5090 / NVIDIA 620.73.04, vkd3d-proton 30b0eb9bc12dc9f. Both requested backend paths completed, but this Wine/DXVK setup is not evidence of genuine Windows WARP coverage. No device/backend skip was reported. These are dispatch/readback checks.

Separately, I combined #1046, #1048, #1050, #1052 and #1053 (all patches applied cleanly) and ran all 14 generated workspace unit/integration test executables with all features. Combined: 345 passed, 5 failed, 6 ignored; matched baseline: 341 passed, 5 failed, 6 ignored. This full-suite result belongs to the combined tree. The five failures match baseline: empty pipeline library (#347), Wine Winsock export (#217), checksum-rejection expectation, nested Cargo fixture build, and Windows xtask launching host Git. Native Linux checks of that tree pass: shader 96 passed / 1 ignored, xtask 4 passed, asset policy clean.

Windows-target cargo clippy -p victory-shader --all-features --all-targets --locked --offline -- -D warnings fails with clippy::type_complexity at valu_tests.rs:341. This minimal local change passes the same command:

type Pick = fn([u32; 3]) -> u32;
let ops: [(&str, u16, Pick); 6] = [

The alias was removed afterward and is not part of the runtime results. Combined workspace Clippy reports the same issue.

Offline and offscreen; no game data, gameplay, native Windows or Wine doctests. Native d3dcompiler_47 supplied for full-suite GPU fixtures. Aggregate counts include existing early-return tests without optional console compilers/DXIL validator; these changed GPU tests executed. Coverage overlaps #1045, but its exact head was not tested here.

AI-assisted testing with Codex.

**@⁠ThomasHFWright** on GitHub · 2026-11-24 15:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/1052#issuecomment-7136051659) Independent Linux/Wine hardware run of `8610ffb85baedbc7b8c4c9de1222b0911e00e589` on base `ffe310e`: **the changed regression passes**, exercising 750 checks: all 125 ordered triples for each of six signed/unsigned min3/max3/med3 operations. Built and run from this PR alone, without instrumentation changes. Rust 1.98.1, Windows MSVC target, Wine 11.22, RTX 5090 / NVIDIA 620.73.04, vkd3d-proton `30b0eb9bc12dc9f`. Both requested backend paths completed, but this Wine/DXVK setup is not evidence of genuine Windows WARP coverage. No device/backend skip was reported. These are dispatch/readback checks. Separately, I combined #1046, #1048, #1050, #1052 and #1053 (all patches applied cleanly) and ran all 14 generated workspace unit/integration test executables with all features. **Combined: 345 passed, 5 failed, 6 ignored; matched baseline: 341 passed, 5 failed, 6 ignored.** This full-suite result belongs to the combined tree. The five failures match baseline: empty pipeline library (#347), Wine Winsock export (#217), checksum-rejection expectation, nested Cargo fixture build, and Windows xtask launching host Git. Native Linux checks of that tree pass: shader 96 passed / 1 ignored, xtask 4 passed, asset policy clean. Windows-target `cargo clippy -p victory-shader --all-features --all-targets --locked --offline -- -D warnings` fails with `clippy::type_complexity` at `valu_tests.rs:341`. This minimal local change passes the same command: ```rust type Pick = fn([u32; 3]) -> u32; let ops: [(&str, u16, Pick); 6] = [ ``` The alias was removed afterward and is not part of the runtime results. Combined workspace Clippy reports the same issue. Offline and offscreen; no game data, gameplay, native Windows or Wine doctests. Native `d3dcompiler_47` supplied for full-suite GPU fixtures. Aggregate counts include existing early-return tests without optional console compilers/DXIL validator; these changed GPU tests executed. Coverage overlaps #1045, but its exact head was not tested here. AI-assisted testing with Codex.
Author
Owner

@⁠ghost on GitHub · 2026-11-24 16:14 UTC · original

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 41b2472 on main ffe310e.

  • v_min3_max3_med3_integer_forms_match_rdna2 passes (750 checks over the six signed/unsigned ops).
  • victory-shader lib tests: 120 passed, 1 failed, 1 ignored (main's 119 plus the new test). The one failure, stub_pipeline_is_created, fails on main on this host too (likely vkd3d-proton accepting the zero DXIL digest the test expects refused; environment, not this PR).
  • No hangs.

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.

**@⁠ghost** on GitHub · 2026-11-24 16:14 UTC · [original](https://github.com/Marvisak/VIctory/pull/1052#issuecomment-7137332076) 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 `41b2472` on main `ffe310e`. - `v_min3_max3_med3_integer_forms_match_rdna2` passes (750 checks over the six signed/unsigned ops). - victory-shader lib tests: 120 passed, 1 failed, 1 ignored (main's 119 plus the new test). The one failure, `stub_pipeline_is_created`, fails on main on this host too (likely vkd3d-proton accepting the zero DXIL digest the test expects refused; environment, not this PR). - No hangs. 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.
Author
Owner

@⁠Zipettte on GitHub · 2026-11-24 16:30 UTC · original

Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 41b2472: cargo test -p victory-shader passes, 121 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed).

Tested with AI assistance (Claude).

**@⁠Zipettte** on GitHub · 2026-11-24 16:30 UTC · [original](https://github.com/Marvisak/VIctory/pull/1052#issuecomment-7137767307) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 41b2472: `cargo test -p victory-shader` passes, 121 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
Author
Owner

@⁠DeerSilver on GitHub · 2026-11-24 18:39 UTC · original

Tested head 41b2472 merged onto main ffe310e (clean merge) on NVIDIA GeForce RTX 5060 Laptop GPU (Blackwell), driver 621.24, Windows 11 26300, Rust 1.98.1: pass. No game files: the test suite only.

  • The new test passes on both the RTX 5060 (hardware) and WARP, with no no SM 6.6 skip:
    • v_min3_max3_med3_integer_forms_match_rdna2
  • With the D3D12 debug layer on (Graphics Tools; --all-features so victory-gpu enables it, plus a local, uncommitted EnableDebugLayer in emit::host::Host::new for the shader tests), the run logs no debug-layer message that main doesn't log too.
  • cargo test --workspace --all-features --locked: 347 passed, 0 failed, 6 ignored (main with all features: 346 / 6).
  • cargo clippy --workspace --all-targets --locked -- -D warnings, with and without --all-features: clean.

AI-assisted (Claude Code).

**@⁠DeerSilver** on GitHub · 2026-11-24 18:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/1052#issuecomment-7140953960) Tested head `41b2472` merged onto `main` `ffe310e` (clean merge) on **NVIDIA GeForce RTX 5060 Laptop GPU** (Blackwell), driver 621.24, Windows 11 26300, Rust 1.98.1: **pass.** No game files: the test suite only. - The new test passes on both the RTX 5060 (hardware) and WARP, with no `no SM 6.6` skip: - `v_min3_max3_med3_integer_forms_match_rdna2` - **With the D3D12 debug layer on** (Graphics Tools; `--all-features` so `victory-gpu` enables it, plus a local, uncommitted `EnableDebugLayer` in `emit::host::Host::new` for the shader tests), the run logs no debug-layer message that `main` doesn't log too. - `cargo test --workspace --all-features --locked`: **347 passed, 0 failed, 6 ignored** (`main` with all features: 346 / 6). - `cargo clippy --workspace --all-targets --locked -- -D warnings`, with and without `--all-features`: clean. AI-assisted (Claude Code).
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!1052
No description provided.