Shaders: add hardware tests for v_cmp_class_f32, integer min3/max3/med3, and f16 signed-zero min/max #1164

Closed
geiyiliyabumo wants to merge 1 commit from upstream-pr/1164 into main
geiyiliyabumo commented 2026-11-24 16:18:48 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-24T16:18:48Z.


Summary

Relates to #799, Relates to #800, Relates to #802

Full verification details and change notes are documented in #799, #800, #802 (commit 9a173fc, based on main ffe310e).

 crates/victory-shader/src/emit/valu_tests.rs | 190 +++++++++++++++++++++++++++
 1 file changed, 190 insertions(+)

Verification (Windows 11 x64 MSVC)

  • rustfmt --edition 2024 --check on edited files: PASS
  • cargo xtask policy: PASS (zero game files/data)
  • cargo clippy --all-targets --locked -- -D warnings (default + --features diagnostics where applicable): PASS
  • Targeted & crate unit/GPU tests: PASS

AI-assisted; synthetic tests only, no game files.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6586328587 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1164). Originally posted by [geiyiliyabumo](https://github.com/geiyiliyabumo) on 2026-11-24T16:18:48Z. --- ### Summary Relates to #799, Relates to #800, Relates to #802 Full verification details and change notes are documented in #799, #800, #802 (commit `9a173fc`, based on `main` `ffe310e`). ```text crates/victory-shader/src/emit/valu_tests.rs | 190 +++++++++++++++++++++++++++ 1 file changed, 190 insertions(+) ``` ### Verification (Windows 11 x64 MSVC) - `rustfmt --edition 2024 --check` on edited files: **PASS** - `cargo xtask policy`: **PASS** (zero game files/data) - `cargo clippy --all-targets --locked -- -D warnings` (default + `--features diagnostics` where applicable): **PASS** - Targeted & crate unit/GPU tests: **PASS** *AI-assisted; synthetic tests only, no game files.*
Zipettte commented 2026-11-24 18:06:12 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Zipettte on 2026-11-24T18:00:59Z.


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

Tested with AI assistance (Claude).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140034390 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1164#issuecomment-7140034390). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T18:00:59Z. --- Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at 9a173fc: `cargo test -p victory-shader` passes, 123 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
DeerSilver commented 2026-11-24 19:04:20 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DeerSilver on 2026-11-24T18:39:34Z.


Tested head 9a173fc 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 tests pass on both the RTX 5060 (hardware) and WARP, with no no SM 6.6 skip:
    • v_cmp_class_f32_matches_rdna2
    • v_min3_max3_med3_integers_match_rdna2
    • max_and_min_f16_order_negative_zero_below_positive_zero
  • 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: 349 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.

These overlap with LouisRiverstone's PRs: #1053 adds a v_cmp_class_f32_matches_rdna2 too, #1052 tests the integer v_min3/v_max3/v_med3, and #1050 the f16 negative-zero ordering. Both versions pass here, but the two v_cmp_class_f32_matches_rdna2 tests can't both be merged under that name.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7140955077 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1164#issuecomment-7140955077). Originally posted by [DeerSilver](https://github.com/DeerSilver) on 2026-11-24T18:39:34Z. --- Tested head `9a173fc` 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 tests pass on both the RTX 5060 (hardware) and WARP, with no `no SM 6.6` skip: - `v_cmp_class_f32_matches_rdna2` - `v_min3_max3_med3_integers_match_rdna2` - `max_and_min_f16_order_negative_zero_below_positive_zero` - **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`: **349 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. These overlap with LouisRiverstone's PRs: #1053 adds a `v_cmp_class_f32_matches_rdna2` too, #1052 tests the integer `v_min3`/`v_max3`/`v_med3`, and #1050 the f16 negative-zero ordering. Both versions pass here, but the two `v_cmp_class_f32_matches_rdna2` tests can't both be merged under that name. AI-assisted (Claude Code).
geiyiliyabumo commented 2026-11-24 21:28:27 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by geiyiliyabumo on 2026-11-24T21:07:26Z.


Thanks @DeerSilver for verifying on RTX 5060 + D3D12 Debug Layer! Happy to rebase or rename v_cmp_class_f32_matches_rdna2 if #1050/#1052/#1053 land first.

AI-assisted; synthetic tests only, no game files.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7144506563 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1164#issuecomment-7144506563). Originally posted by [geiyiliyabumo](https://github.com/geiyiliyabumo) on 2026-11-24T21:07:26Z. --- Thanks @DeerSilver for verifying on RTX 5060 + D3D12 Debug Layer! Happy to rebase or rename `v_cmp_class_f32_matches_rdna2` if #1050/#1052/#1053 land first. *AI-assisted; synthetic tests only, no game files.*
upstream-sync closed this pull request 2026-11-25 01:05:45 +00:00
Marvisak commented 2026-11-25 01:08:02 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T00:33:22Z.


Automated triage for the maintainers. Closing because another open pull request covers the same change.

See #1052. Tests only: v_cmp_class_f32, integer min3/max3/med3, f16 signed-zero min/max. Main's semantics_tests.rs covers class compares, f16 zeros and integer med3 since today; the integer min3/max3 test is the clean #1052. Same set as #1045 and the clean #1050/#1052/#1053.

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.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148631214 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1164#issuecomment-7148631214). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:33:22Z. --- Automated triage for the maintainers. Closing because another open pull request covers the same change. See #1052. Tests only: v_cmp_class_f32, integer min3/max3/med3, f16 signed-zero min/max. Main's semantics_tests.rs covers class compares, f16 zeros and integer med3 since today; the integer min3/max3 test is the clean #1052. Same set as #1045 and the clean #1050/#1052/#1053. 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

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
Marvisak/VIctory!1164
No description provided.