Shader tests: failures name the adapter that ran them #1138

Open
ayanbarosan wants to merge 2 commits from upstream-pr/1138 into main
ayanbarosan commented 2026-11-24 16:07:55 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ayanbarosan on 2026-11-24T16:07:55Z.


The GPU tests in victory-shader run on D3D12's default adapter, which on a laptop is often the integrated GPU, and a failure only says hardware. So testers report the GPU they expect: the v_med3_f32 failures in #726 and #745 were filed as NVIDIA, but on an Optimus laptop the test fails on the Intel iGPU and passes on the RTX 3050 (#726).

Change: the labels of run_cases (emit/valu_tests.rs) and run (emit/waterfall_tests.rs) are read from the device (GetAdapterLuid, EnumAdapterByLuid, GetDesc1) by a new Host::backend(). It gives hardware or warp from the adapter's software flag or the Basic Render Driver's ids, so with VICTORY_WARP=1 both runs say warp, then the adapter's name, which Host::adapter() gives on its own. A failure now reads:

hardware (Intel(R) UHD Graphics): v_med3_f32(1.0, 2.0, NaN) = 2 (0x40000000), want 1

Two commits, 3 files, +58 −4. Host::new is untouched, and the branch merges cleanly with #233, #439, #1483 and #1487, which also change emit/host.rs. Related: point 1 of #1132 proposes making the discrete GPU the default test device, which #1487 does. That is independent of this change and fits with it: whichever adapter runs a test, a failure names it.

Tested at 2eb4d03, on main at ffe310e (i5-11400H, Intel UHD + RTX 3050 Laptop, Windows 11 build 26300):

  • cargo test --workspace --locked --no-fail-fast: 341 passed, 1 failed, 6 ignored, as on main. The one failure is v_med3_f32_matches_rdna2_with_nan on the Intel UHD (#726), and its message above now names the adapter.
  • cargo test -p victory-shader --locked --lib -- --test-threads=1 with VICTORY_WARP=1: 120 passed, 0 failed, 1 ignored. A local probe printed warp (Microsoft Basic Render Driver) for both runs.
  • cargo clippy --workspace --all-targets --locked -- -D warnings, also with --all-features: clean. rustfmt: clean.

No game data used.

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:6586118167 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1138). Originally posted by [ayanbarosan](https://github.com/ayanbarosan) on 2026-11-24T16:07:55Z. --- The GPU tests in `victory-shader` run on D3D12's default adapter, which on a laptop is often the integrated GPU, and a failure only says `hardware`. So testers report the GPU they expect: the `v_med3_f32` failures in #726 and #745 were filed as NVIDIA, but on an Optimus laptop the test fails on the Intel iGPU and passes on the RTX 3050 (#726). **Change:** the labels of `run_cases` (`emit/valu_tests.rs`) and `run` (`emit/waterfall_tests.rs`) are read from the device (`GetAdapterLuid`, `EnumAdapterByLuid`, `GetDesc1`) by a new `Host::backend()`. It gives `hardware` or `warp` from the adapter's software flag or the Basic Render Driver's ids, so with `VICTORY_WARP=1` both runs say `warp`, then the adapter's name, which `Host::adapter()` gives on its own. A failure now reads: ``` hardware (Intel(R) UHD Graphics): v_med3_f32(1.0, 2.0, NaN) = 2 (0x40000000), want 1 ``` Two commits, 3 files, +58 −4. `Host::new` is untouched, and the branch merges cleanly with #233, #439, #1483 and #1487, which also change `emit/host.rs`. Related: point 1 of #1132 proposes making the discrete GPU the default test device, which #1487 does. That is independent of this change and fits with it: whichever adapter runs a test, a failure names it. **Tested** at 2eb4d03, on `main` at ffe310e (i5-11400H, Intel UHD + RTX 3050 Laptop, Windows 11 build 26300): - `cargo test --workspace --locked --no-fail-fast`: 341 passed, 1 failed, 6 ignored, as on main. The one failure is `v_med3_f32_matches_rdna2_with_nan` on the Intel UHD (#726), and its message above now names the adapter. - `cargo test -p victory-shader --locked --lib -- --test-threads=1` with `VICTORY_WARP=1`: 120 passed, 0 failed, 1 ignored. A local probe printed `warp (Microsoft Basic Render Driver)` for both runs. - `cargo clippy --workspace --all-targets --locked -- -D warnings`, also with `--all-features`: clean. rustfmt: clean. No game data used. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
DoubleD17 commented 2026-11-24 18:03:58 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by DoubleD17 on 2026-11-24T17:29:40Z.

Review: COMMENTED


On ec69667, both the VALU and waterfall runners keep the loop's hardware or warp prefix and append the device's DXGI adapter name. With VICTORY_WARP=1, Host::new selects WARP for both iterations. If device creation succeeds, the first iteration can therefore report hardware (<WARP adapter name>), even though both ran on WARP. Could the prefix reflect the effective backend when the override is set? I checked the selection and formatting paths by source inspection. I did not run D3D12 or capture the adapter string.

AI-assisted.

<!-- greyfinch-sync:Marvisak/VIctory:review:6044205491 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1138#pullrequestreview-6044205491). Originally posted by [DoubleD17](https://github.com/DoubleD17) on 2026-11-24T17:29:40Z. **Review:** COMMENTED --- On `ec69667`, both the VALU and waterfall runners keep the loop's `hardware` or `warp` prefix and append the device's DXGI adapter name. With `VICTORY_WARP=1`, `Host::new` selects WARP for both iterations. If device creation succeeds, the first iteration can therefore report `hardware (<WARP adapter name>)`, even though both ran on WARP. Could the prefix reflect the effective backend when the override is set? I checked the selection and formatting paths by source inspection. I did not run D3D12 or capture the adapter string. AI-assisted.
Zipettte commented 2026-11-24 18:06:14 +00:00 (Migrated from github.com)

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


Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at ec69667: cargo test -p victory-shader passes, 120 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:7140044384 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1138#issuecomment-7140044384). Originally posted by [Zipettte](https://github.com/Zipettte) on 2026-11-24T18:01:24Z. --- Tested on AMD Radeon RX 7700 XT (RDNA3, gfx1101), driver 32.0.32029.2010, Windows 11, Rust 1.98.1 MSVC at ec69667: `cargo test -p victory-shader` passes, 120 passed / 0 failed. Workspace baseline on main (ffe310e) is green on the same machine (342 passed). _Tested with AI assistance (Claude)._
mercuryVM commented 2026-11-24 20:01:51 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by mercuryVM on 2026-11-24T19:27:43Z.

Review: APPROVED


Tested 2eb4d038 on Windows 11, RTX 5070, MSVC:

  • cargo test -p victory-shader -- --test-threads=1 passes on the head (120 passed, 1 ignored).
  • Merged into our fork: the workspace and shader tests pass, and clippy is clean both ways.

Naming the adapter from the device's own LUID, rather than from what Host::new was asked for, is the right source. It also catches VICTORY_WARP=1. The fallback to asked when DXGI can't be queried keeps the labels working.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:review:6045916428 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1138#pullrequestreview-6045916428). Originally posted by [mercuryVM](https://github.com/mercuryVM) on 2026-11-24T19:27:43Z. **Review:** APPROVED --- Tested 2eb4d038 on Windows 11, RTX 5070, MSVC: - `cargo test -p victory-shader -- --test-threads=1` passes on the head (120 passed, 1 ignored). - Merged into our fork: the workspace and shader tests pass, and clippy is clean both ways. Naming the adapter from the device's own LUID, rather than from what `Host::new` was asked for, is the right source. It also catches `VICTORY_WARP=1`. The fallback to `asked` when DXGI can't be queried keeps the labels working. AI-assisted (Claude Code).
ayanbarosan commented 2026-11-24 20:03:25 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by ayanbarosan on 2026-11-24T20:03:09Z.


@DoubleD17 Thanks, you're right: with VICTORY_WARP=1 the first run was labeled hardware although both ran on WARP.

2eb4d03 reads the prefix from the device as well. A new Host::backend() says warp when the device's adapter is flagged as software or has the Basic Render Driver's ids (vendor 0x1414, device 0x8c, the ids #439's hardware() checks), and hardware otherwise, followed by the adapter's name. The loop's prefix is used only when the adapter can't be read. Host::new is still untouched.

A local probe (not pushed) printed this on the laptop from the description:

default VICTORY_WARP=1
Host::new(false).backend("hardware") hardware (Intel(R) UHD Graphics) warp (Microsoft Basic Render Driver)
Host::new(true).backend("warp") warp (Microsoft Basic Render Driver) warp (Microsoft Basic Render Driver)

cargo test -p victory-shader --locked --lib -- --test-threads=1 by default: 119 passed, 1 failed, 1 ignored. The failure is #726 on the Intel UHD, with the same message as in the description. With VICTORY_WARP=1: 120 passed, 0 failed, 1 ignored. clippy (--all-targets, also with --all-features) and rustfmt are clean. The branch still merges cleanly with #233, #439, #1483 and #1487.

Thanks also to Zipettte for the RX 7700 XT run, and to mercuryVM for testing 2eb4d03 on an RTX 5070.

AI-assisted (Claude Code).

<!-- greyfinch-sync:Marvisak/VIctory:comment:7142972984 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1138#issuecomment-7142972984). Originally posted by [ayanbarosan](https://github.com/ayanbarosan) on 2026-11-24T20:03:09Z. --- @DoubleD17 Thanks, you're right: with `VICTORY_WARP=1` the first run was labeled `hardware` although both ran on WARP. 2eb4d03 reads the prefix from the device as well. A new `Host::backend()` says `warp` when the device's adapter is flagged as software or has the Basic Render Driver's ids (vendor 0x1414, device 0x8c, the ids #439's `hardware()` checks), and `hardware` otherwise, followed by the adapter's name. The loop's prefix is used only when the adapter can't be read. `Host::new` is still untouched. A local probe (not pushed) printed this on the laptop from the description: | | default | `VICTORY_WARP=1` | |---|---|---| | `Host::new(false).backend("hardware")` | `hardware (Intel(R) UHD Graphics)` | `warp (Microsoft Basic Render Driver)` | | `Host::new(true).backend("warp")` | `warp (Microsoft Basic Render Driver)` | `warp (Microsoft Basic Render Driver)` | `cargo test -p victory-shader --locked --lib -- --test-threads=1` by default: 119 passed, 1 failed, 1 ignored. The failure is #726 on the Intel UHD, with the same message as in the description. With `VICTORY_WARP=1`: 120 passed, 0 failed, 1 ignored. clippy (`--all-targets`, also with `--all-features`) and rustfmt are clean. The branch still merges cleanly with #233, #439, #1483 and #1487. Thanks also to Zipettte for the RX 7700 XT run, and to mercuryVM for testing 2eb4d03 on an RTX 5070. AI-assisted (Claude Code).
Marvisak commented 2026-11-25 01:08:08 +00:00 (Migrated from github.com)

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


Automated triage for the maintainers.

Needs rebase. This PR does not merge cleanly into current main (ac2525d). Conflicting files: crates/victory-shader/src/emit/host.rs.

The content has not been reviewed yet; it will be once the branch is rebased onto main.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7148701460 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1138#issuecomment-7148701460). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T00:37:10Z. --- <!-- victory-triage v1 head=2eb4d03805710147e69f016040fe987c7ca3c266 verdict=needs-rebase at=2026-11-25T00:13:20Z --> Automated triage for the maintainers. **Needs rebase.** This PR does not merge cleanly into current `main` (ac2525d). Conflicting files: `crates/victory-shader/src/emit/host.rs`. The content has not been reviewed yet; it will be once the branch is rebased onto `main`. --- _Generated by [Claude Code](https://claude.ai/code)_
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/1138:upstream-pr/1138'
git switch 'upstream-pr/1138'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/1138'
git switch 'upstream-pr/1138'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/1138'
git switch 'upstream-pr/1138'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/1138'
git switch 'main'
git merge --squash 'upstream-pr/1138'
git switch 'main'
git merge --ff-only 'upstream-pr/1138'
git switch 'main'
git merge 'upstream-pr/1138'
git push origin 'main'
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!1138
No description provided.