Shaders: hardware test for v_cmp_class_f32 #1053

Closed
github-bot wants to merge 1 commit from gh-pr/1053/head into gh-pr/1053/base
Owner

@⁠LouisRiverstone on GitHub · 2026-11-24 15:17 UTC · original
LouisRiverstone:shaders/v-cmp-class-f32-test → main · +42 −0 · 1 files · 1 commits · closed without merging

Fixes #799.

v_cmp_class_f32 (VOPC 0x088) shares a branch with v_cmp_class_f16 in lower.rs, but with its own constants (exp_sh = 23, mant_mask = 0x7F_FFFF, quiet_bit = 0x40_0000). Only the f16 form had a test.

New test v_cmp_class_f32_matches_rdna2, mirroring the f16 one: for each of the 10 classes (signalling and quiet NaN of both signs, ±inf, ±normal, ±denormal, ±0) it checks that the class bit alone gives true and the other nine bits give false.

Test only, no production change.

Verify: cargo test -p victory-shader v_cmp_class_f32 (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/1053) `LouisRiverstone:shaders/v-cmp-class-f32-test` → `main` · +42 −0 · 1 files · 1 commits · closed without merging Fixes #799. `v_cmp_class_f32` (VOPC 0x088) shares a branch with `v_cmp_class_f16` in `lower.rs`, but with its own constants (`exp_sh = 23`, `mant_mask = 0x7F_FFFF`, `quiet_bit = 0x40_0000`). Only the f16 form had a test. New test `v_cmp_class_f32_matches_rdna2`, mirroring the f16 one: for each of the 10 classes (signalling and quiet NaN of both signs, ±inf, ±normal, ±denormal, ±0) it checks that the class bit alone gives true and the other nine bits give false. Test only, no production change. **Verify:** `cargo test -p victory-shader v_cmp_class_f32` (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:33 +00:00
github-bot closed this pull request 2026-11-26 04:18:33 +00:00
Author
Owner

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

Independent Linux/Wine hardware run of 393320dfa8cde9ef1744e9cc8931d64ba0e954a8 on base ffe310e: the changed regression passes, exercising 24 checks covering the ten f32 classes, including both signs of signalling and quiet NaNs. 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 shader Clippy with all targets/features and -D warnings passes on this PR alone. Combined workspace Clippy finds a type-complexity warning in #1052, reported there.

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/1053#issuecomment-7136054395) Independent Linux/Wine hardware run of `393320dfa8cde9ef1744e9cc8931d64ba0e954a8` on base `ffe310e`: **the changed regression passes**, exercising 24 checks covering the ten f32 classes, including both signs of signalling and quiet NaNs. 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 shader Clippy with all targets/features and `-D warnings` passes on this PR alone. Combined workspace Clippy finds a type-complexity warning in #1052, reported there. 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

@⁠Baconzido on GitHub · 2026-11-24 15:28 UTC · original

Ran the new test, since the description says it was only type-checked. Windows 11 26300, AMD Radeon RX 5700 (RDNA1, driver 26.11.2) and WARP, dxil.dll from SDK 10.0.26100, Rust 1.98.1, head 393320d (on main ffe310e):

Result
v_cmp_class_f32_matches_rdna2 ok on the RX 5700 and WARP
cargo test -p victory-shader -- --test-threads=1 121 passed, 0 failed, 1 ignored
cargo clippy -p victory-shader --all-targets clean

No game data used.

AI use: Claude Code (Claude Opus 5.5) ran the tests over SSH and drafted this comment; the runs are on my machine.

**@⁠Baconzido** on GitHub · 2026-11-24 15:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/1053#issuecomment-7136085872) Ran the new test, since the description says it was only type-checked. Windows 11 26300, **AMD Radeon RX 5700** (RDNA1, driver 26.11.2) and WARP, `dxil.dll` from SDK 10.0.26100, Rust 1.98.1, head `393320d` (on `main` `ffe310e`): | | Result | |---|---| | `v_cmp_class_f32_matches_rdna2` | ok on the RX 5700 and WARP | | `cargo test -p victory-shader -- --test-threads=1` | 121 passed, 0 failed, 1 ignored | | `cargo clippy -p victory-shader --all-targets` | clean | No game data used. AI use: Claude Code (Claude Opus 5.5) ran the tests over SSH and drafted this comment; the runs are on my machine.
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 393320d: 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/1053#issuecomment-7137766741) Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 393320d: `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 393320d 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_cmp_class_f32_matches_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/1053#issuecomment-7140954563) Tested head `393320d` 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_cmp_class_f32_matches_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).
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 00:31 UTC · original

Automated triage for the maintainers. Closing because this change is already in main, or main has since replaced the code it patches.

v_cmp_class_f32 is already tested in main: semantics_tests.rs class_compares_match_the_hardware runs opcode 0x88 over all ten classes and 13 masks.

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.

**@⁠Marvisak** on GitHub · 2026-11-25 00:31 UTC · [original](https://github.com/Marvisak/VIctory/pull/1053#issuecomment-7148592366) Automated triage for the maintainers. Closing because this change is already in `main`, or `main` has since replaced the code it patches. v_cmp_class_f32 is already tested in main: semantics_tests.rs `class_compares_match_the_hardware` runs opcode 0x88 over all ten classes and 13 masks. 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

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!1053
No description provided.