Shader tests: skip the GPU suites a device cannot run #1991

Open
github-bot wants to merge 3 commits from github-bot/gh-1991 into main AGit
Owner

@⁠Calvix2k on GitHub · 2026-11-25 02:28 UTC · original
Calvix2k:codex/shader-tests-skip-1829 → main · +98 −28 · 10 files · 3 commits · open

Part of #1829.

Problem

The GPU probe suites fail on a host that cannot run what they ask for, instead of skipping like the rest of the crate does. Three separate limits, all seen on real reports:

  1. No SM 6.6 device at all. semantics_tests::check asserted !hosts.is_empty(), and the run_cases-style helpers in valu_tests, stride_tests, memory_tests, bvh_tests, diff_tests, waterfall_tests and synthetic_tests ended in assert!(ran > 0, "neither hardware nor WARP SM 6.6 device available") after already printing "skipped" per device. My Windows 10 host is one of these: the RX 7800 XT reports SM 6.5 and WARP SM 6.2, so cargo test -p victory-shader --lib was 75 failed on a clean main.
  2. A device whose wave lanes cannot hold 32. synthetic_tests::permutes_read_the_lane_named… asserted that the hardware pipeline for a wave of 32 must build, while WARP and Intel Xe-LP report 4/16 lanes (#1829) and correctly refuse it.
  3. The semantics suite had no "no device" path at all.

Change

  • emit/host.rs: Host::wave32() reads D3D12_FEATURE_DATA_D3D12_OPTIONS1 (WaveLaneCountMin..=WaveLaneCountMax covers 32).
  • emit/synthetic_tests.rs: skip when the device cannot run a wave of 32; if it claims 32 lanes and the pipeline still fails, the test still panics, so this does not hide a real pipeline regression.
  • emit/{semantics,valu,stride,memory,bvh,diff,waterfall,synthetic}_tests.rs: the "no device" asserts become skips, matching the eprintln!("… skipped") convention the same helpers already use per device.

Verification

cargo test -p victory-shader --lib on the RX 7800 XT / Windows 10 19045 host:

tree result
main 940d32f 242 passed, 75 failed, 3 ignored
this branch 247 passed, 0 failed, 3 ignored

cargo clippy -p victory-shader --all-targets -- -D warnings clean, cargo xtask policy 9 files ok.

CI has an SM 6.6 device (its runs of this branch show the suites executing, not skipping), so nothing is lost where the features exist; the 5 arithmetic differences from #1829's Intel report are unchanged and untouched by this PR.

**@⁠Calvix2k** on GitHub · 2026-11-25 02:28 UTC · [original](https://github.com/Marvisak/VIctory/pull/1991) `Calvix2k:codex/shader-tests-skip-1829` → `main` · +98 −28 · 10 files · 3 commits · open Part of #1829. ## Problem The GPU probe suites fail on a host that cannot run what they ask for, instead of skipping like the rest of the crate does. Three separate limits, all seen on real reports: 1. **No SM 6.6 device at all.** `semantics_tests::check` asserted `!hosts.is_empty()`, and the `run_cases`-style helpers in `valu_tests`, `stride_tests`, `memory_tests`, `bvh_tests`, `diff_tests`, `waterfall_tests` and `synthetic_tests` ended in `assert!(ran > 0, "neither hardware nor WARP SM 6.6 device available")` after already printing "skipped" per device. My Windows 10 host is one of these: the RX 7800 XT reports SM 6.5 and WARP SM 6.2, so `cargo test -p victory-shader --lib` was **75 failed** on a clean `main`. 2. **A device whose wave lanes cannot hold 32.** `synthetic_tests::permutes_read_the_lane_named…` asserted that the hardware pipeline for a wave of 32 must build, while WARP and Intel Xe-LP report 4/16 lanes (#1829) and correctly refuse it. 3. **The semantics suite** had no "no device" path at all. ## Change - `emit/host.rs`: `Host::wave32()` reads `D3D12_FEATURE_DATA_D3D12_OPTIONS1` (`WaveLaneCountMin..=WaveLaneCountMax` covers 32). - `emit/synthetic_tests.rs`: skip when the device cannot run a wave of 32; if it *claims* 32 lanes and the pipeline still fails, the test still panics, so this does not hide a real pipeline regression. - `emit/{semantics,valu,stride,memory,bvh,diff,waterfall,synthetic}_tests.rs`: the "no device" asserts become skips, matching the `eprintln!("… skipped")` convention the same helpers already use per device. ## Verification `cargo test -p victory-shader --lib` on the RX 7800 XT / Windows 10 19045 host: | tree | result | |---|---| | `main` `940d32f` | 242 passed, **75 failed**, 3 ignored | | this branch | **247 passed, 0 failed**, 3 ignored | `cargo clippy -p victory-shader --all-targets -- -D warnings` clean, `cargo xtask policy` 9 files ok. CI has an SM 6.6 device (its runs of this branch show the suites executing, not skipping), so nothing is lost where the features exist; the 5 arithmetic differences from #1829's Intel report are unchanged and untouched by this PR.
The GPU probe suites failed instead of skipping on hosts without what
they need: a device below SM 6.6 (this Windows 10 machine reports 6.5 for
the RX 7800 XT and 6.2 for WARP), a device whose wave lanes cannot hold
32 (old WARP, Intel Xe-LP as in #1829), and the semantics suite asserted
a device exists at all. Every other suite in the crate already prints
"skipped" and returns.

Add Host::wave32 from D3D12_FEATURE_DATA_D3D12_OPTIONS1, skip the
permute test on a device that cannot run a wave of 32 while still failing
a device that claims it and refuses the pipeline, and turn the
"no device ran these cases" asserts into skips.

On the RX 7800 XT/Windows 10 host this makes
cargo test -p victory-shader --lib 247 passed, 0 failed (75 failed
before); CI keeps its SM 6.6 device, where the suites still run.
The zero-device path turned every "no device ran" assert into a silent
pass, which would also hide a runner image that loses SM 6.6. Route all of
them through `host::no_device`, which panics when `CI` is set and skips
with the `Host::new` errors otherwise; `semantics_tests` now keeps those
errors instead of discarding them with `.ok()`. Name the gather's skip for
what it is (it said "permute", copied from the permute test).
Only the test modules call it; a lib build saw dead code under -D warnings.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:50:53 +00:00
Author
Owner

@⁠DesertGamer on GitHub · 2026-11-25 02:39 UTC · original

VIctory V2: community PRs, merged and tested

Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.

Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).

⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.

Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2

Unofficial community fork of Marvisak/VIctory, GPL-3.0.

**@⁠DesertGamer** on GitHub · 2026-11-25 02:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/1991#issuecomment-7151007872) ### VIctory V2: community PRs, merged and tested Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch. **Where it stands today:** launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1). :warning: Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk. Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help: https://DesertGamer/VIctory-V2 *Unofficial community fork of Marvisak/VIctory, GPL-3.0.*
Author
Owner

@⁠upipibi on GitHub · 2026-11-25 03:00 UTC · original

Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at 02aedf4. victory-shader: 244 passed, 3 failed, 3 ignored. The 3 are #1744's NVIDIA failures on main (the two stride_tests heap-buffer reads and gathers_at_a_level_match_the_hardware). victory-gpu: 141 passed, 2 failed, with only the two NVIDIA heap-cap failures main also has (dynamic_slots_are_held_until_released, lists_share_a_table_and_copies_keep_their_views). Same as main on this hardware. Not run: a title.

AI-assisted (Claude Code).

**@⁠upipibi** on GitHub · 2026-11-25 03:00 UTC · [original](https://github.com/Marvisak/VIctory/pull/1991#issuecomment-7151492919) Ran on Windows 11 with an RTX 3070 (Ampere, driver 616.56), debug build, at `02aedf4`. `victory-shader`: 244 passed, 3 failed, 3 ignored. The 3 are #1744's NVIDIA failures on `main` (the two `stride_tests` heap-buffer reads and `gathers_at_a_level_match_the_hardware`). `victory-gpu`: 141 passed, 2 failed, with only the two NVIDIA heap-cap failures `main` also has (`dynamic_slots_are_held_until_released`, `lists_share_a_table_and_copies_keep_their_views`). Same as `main` on this hardware. Not run: a title. AI-assisted (Claude Code).
Author
Owner

@⁠jeremygold02 on GitHub · 2026-11-25 03:38 UTC · original

Triage verdict — Keep capability skips, distinguish them from setup failures (02aedf4)

Evidence

  • The wave32 capability check correctly keeps pipeline failure visible on a device that claims support. The broader zero-run change is less precise: Host::new also returns errors from factory enumeration, device creation, and feature-query calls. For example, semantics_tests::check drops all those errors through .ok() and now returns a passing empty result when no host starts.

Checks and limits

  • The exact-head Windows check passed. With these early returns, a green Cargo summary alone cannot establish that the GPU probes ran. I reviewed source and published checks without reproducing a setup failure.

Next step

  • Keep genuine capability skips, but preserve the initialization reason and fail unexpected setup errors where a host is expected. Add a check for an unsupported host and a separate unexpected setup error, or offer a strict GPU test mode that requires at least one actual run. #2019’s shared-lock coverage addresses a separate problem.

This verification was AI-assisted.

**@⁠jeremygold02** on GitHub · 2026-11-25 03:38 UTC · [original](https://github.com/Marvisak/VIctory/pull/1991#issuecomment-7152102767) **Triage verdict — Keep capability skips, distinguish them from setup failures** (`02aedf4`) **Evidence** - The wave32 capability check correctly keeps pipeline failure visible on a device that claims support. The broader zero-run change is less precise: `Host::new` also returns errors from factory enumeration, device creation, and feature-query calls. For example, `semantics_tests::check` drops all those errors through `.ok()` and now returns a passing empty result when no host starts. **Checks and limits** - The [exact-head Windows check](https://github.com/Marvisak/VIctory/actions/runs/45533232597/job/138933472958) passed. With these early returns, a green Cargo summary alone cannot establish that the GPU probes ran. I reviewed source and published checks without reproducing a setup failure. **Next step** - Keep genuine capability skips, but preserve the initialization reason and fail unexpected setup errors where a host is expected. Add a check for an unsupported host and a separate unexpected setup error, or offer a strict GPU test mode that requires at least one actual run. #2019’s shared-lock coverage addresses a separate problem. This verification was AI-assisted.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 08:27 UTC · original · edited 2026-11-25 16:45 UTC

Automated triage for the maintainers.

Merge candidate. Re-reviewed at 9f53576, a rebase onto current main that merges cleanly. In stride_tests.rs, main's new D16 tests are kept, and the skip pattern is applied only to the tests the PR touches.

What it does:

  • The GPU tests in crates/victory-shader/src/emit/ no longer assert that a device ran. They call the new host::no_device (test-only), which skips locally and panics when CI is set. So a runner that loses SM 6.6 still fails instead of passing silently.
  • semantics_tests::check now keeps each Host::new error and includes it in that message. This covers the setup-error concern raised in an earlier comment.
  • The permute test skips a device only when Host::wave32() reports that it cannot run 32-lane waves (from D3D12_OPTIONS1 WaveLaneCountMin/Max). A device that claims 32 lanes but refuses the pipeline now fails instead of being skipped.

wave32() sits in the host module, which is built only for tests or the host feature, so it adds no dead code to normal builds.

CI: passing (check).


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 08:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/1991#issuecomment-7157042072) · edited 2026-11-25 16:45 UTC <!-- victory-triage v1 head=9f53576eaf932dc87e97c7c717c74b5a2eadbb3a verdict=merge-candidate at=2026-11-25T16:44:15Z --> Automated triage for the maintainers. **Merge candidate.** Re-reviewed at `9f53576`, a rebase onto current `main` that merges cleanly. In `stride_tests.rs`, `main`'s new D16 tests are kept, and the skip pattern is applied only to the tests the PR touches. What it does: - The GPU tests in `crates/victory-shader/src/emit/` no longer assert that a device ran. They call the new `host::no_device` (test-only), which skips locally and **panics when `CI` is set**. So a runner that loses SM 6.6 still fails instead of passing silently. - `semantics_tests::check` now keeps each `Host::new` error and includes it in that message. This covers the setup-error concern raised in an earlier comment. - The permute test skips a device only when `Host::wave32()` reports that it cannot run 32-lane waves (from `D3D12_OPTIONS1` `WaveLaneCountMin/Max`). A device that claims 32 lanes but refuses the pipeline now fails instead of being skipped. `wave32()` sits in the `host` module, which is built only for tests or the `host` feature, so it adds no dead code to normal builds. CI: passing (`check`). --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠Calvix2k on GitHub · 2026-11-25 16:39 UTC · original

Rebased onto main 67e8ae1 (9f53576). The only conflict was stride_tests.rs, where main added the D16 tests right after the clamp test: kept those tests and applied the skip pattern to the test the PR touches. Host::wave32() is unchanged.

Compiles and clippy -D warnings clean. KainanP's Intel table is the confirmation of the intent: permute becomes no wave of 32 on this device; skipped instead of no pipeline. The PR is mergeable again.

**@⁠Calvix2k** on GitHub · 2026-11-25 16:39 UTC · [original](https://github.com/Marvisak/VIctory/pull/1991#issuecomment-7168320087) Rebased onto `main 67e8ae1` (`9f53576`). The only conflict was `stride_tests.rs`, where `main` added the D16 tests right after the clamp test: kept those tests and applied the skip pattern to the test the PR touches. `Host::wave32()` is unchanged. Compiles and clippy `-D warnings` clean. KainanP's Intel table is the confirmation of the intent: `permute` becomes `no wave of 32 on this device; skipped` instead of `no pipeline`. The PR is mergeable again.
Author
Owner

@⁠catminou4 on GitHub · 2026-11-25 02:56 UTC · original · approved these changes

Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f69b, cargo test -p victory-shader --locked.

144 passed / 0 failed / 2 ignored. GPU test suites skip on devices that can't run them — test-harness capability gating across 9 files; same cluster as #1911/#1919/#1925 (those conflict with main).

**@⁠catminou4** on GitHub · 2026-11-25 02:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/1991#pullrequestreview-6051183562) · **approved these changes** Tested locally: macOS arm64, rustc 1.98.1, PR head merged into main 940d32f69b, `cargo test -p victory-shader --locked`. 144 passed / 0 failed / 2 ignored. GPU test suites skip on devices that can't run them — test-harness capability gating across 9 files; same cluster as #1911/#1919/#1925 (those conflict with main).
Author
Owner

@⁠fuzeofficlal on GitHub · 2026-11-26 19:29 UTC · original · requested changes

Tested locally merged onto origin/main (63bcca43, Windows 11 x64, Rust 1.98.1 MSVC, RTX 5090 & WARP):

  • VICTORY_WARP=0: emit::synthetic_tests::permutes (2 passed), emit::crosslane_tests:: (5 passed), emit::waterfall_tests:: (5 passed), emit::bvh_tests:: (14 passed), emit::tests:: (17 passed), emit::memory_tests:: skipping pre-existing heap_direct_texture_reads_mark_their_heap_index crash (4 passed)
  • VICTORY_WARP=1: emit::synthetic_tests::permutes — 1 passed, 1 FAILED (emit::synthetic_tests::permutes_mask_high_address_bits_and_divergent_branches panicked at crates/victory-shader/src/emit/synthetic_tests.rs:416:13: hardware: no pipeline for a wave of 32) (remaining checked WARP suites: crosslane_tests 5/5, waterfall_tests 5/5, bvh_tests 14/14, emit::tests 17/17, memory_tests 5/5)
  • cargo clippy --locked -p victory-shader --all-targets -- -D warnings (default and --all-features) — 0 warnings
  • cargo xtask policy — ok (191 files ok)

Blocking issue

  • run_permute_cs (crates/victory-shader/src/emit/synthetic_tests.rs:415-419) still uses the unguarded assert!(warp || wave64, "{label}: no pipeline for a wave of 32") check instead of if !host.wave32(), unlike permutes_read_the_lane_named_and_zero_from_lanes_left_out right above it (349-355). On any Wave32-incapable primary adapter (and under VICTORY_WARP=1), permutes_mask_high_address_bits_and_divergent_branches still panics instead of skipping.

Additional notes

  • Host::wave32() (crates/victory-shader/src/emit/host.rs:218-230) checks WaveLaneCountMin <= 32 && 32 <= WaveLaneCountMax without checking options.WaveOps.as_bool().
  • permutes_read_the_lane_named_and_zero_from_lanes_left_out (synthetic_tests.rs:341-370) has no no_device zero-run guard, so it can pass silently even with CI set if neither adapter runs.
  • Heads-up for combining with #2225: semantics_tests::check (semantics_tests.rs:551-562) overlaps with #2225's Host::test_backends() loop.
**@⁠fuzeofficlal** on GitHub · 2026-11-26 19:29 UTC · [original](https://github.com/Marvisak/VIctory/pull/1991#pullrequestreview-6079552937) · **requested changes** Tested locally merged onto `origin/main` (`63bcca43`, Windows 11 x64, Rust 1.98.1 MSVC, RTX 5090 & WARP): - `VICTORY_WARP=0`: `emit::synthetic_tests::permutes` (**2 passed**), `emit::crosslane_tests::` (**5 passed**), `emit::waterfall_tests::` (**5 passed**), `emit::bvh_tests::` (**14 passed**), `emit::tests::` (**17 passed**), `emit::memory_tests::` skipping pre-existing `heap_direct_texture_reads_mark_their_heap_index` crash (**4 passed**) - `VICTORY_WARP=1`: `emit::synthetic_tests::permutes` — **1 passed, 1 FAILED** (`emit::synthetic_tests::permutes_mask_high_address_bits_and_divergent_branches` panicked at `crates/victory-shader/src/emit/synthetic_tests.rs:416:13: hardware: no pipeline for a wave of 32`) (remaining checked WARP suites: `crosslane_tests` 5/5, `waterfall_tests` 5/5, `bvh_tests` 14/14, `emit::tests` 17/17, `memory_tests` 5/5) - `cargo clippy --locked -p victory-shader --all-targets -- -D warnings` (default and `--all-features`) — 0 warnings - `cargo xtask policy` — ok (`191 files ok`) ### Blocking issue - **`run_permute_cs` (`crates/victory-shader/src/emit/synthetic_tests.rs:415-419`) still uses the unguarded `assert!(warp || wave64, "{label}: no pipeline for a wave of 32")` check** instead of `if !host.wave32()`, unlike `permutes_read_the_lane_named_and_zero_from_lanes_left_out` right above it (`349-355`). On any Wave32-incapable primary adapter (and under `VICTORY_WARP=1`), `permutes_mask_high_address_bits_and_divergent_branches` still panics instead of skipping. ### Additional notes - `Host::wave32()` (`crates/victory-shader/src/emit/host.rs:218-230`) checks `WaveLaneCountMin <= 32 && 32 <= WaveLaneCountMax` without checking `options.WaveOps.as_bool()`. - `permutes_read_the_lane_named_and_zero_from_lanes_left_out` (`synthetic_tests.rs:341-370`) has no `no_device` zero-run guard, so it can pass silently even with `CI` set if neither adapter runs. - Heads-up for combining with #2225: `semantics_tests::check` (`semantics_tests.rs:551-562`) overlaps with #2225's `Host::test_backends()` loop.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1991/head:github-bot/gh-1991'
git switch 'github-bot/gh-1991'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1991'
git switch 'github-bot/gh-1991'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1991'
git switch 'github-bot/gh-1991'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1991'
git switch 'main'
git merge --squash 'github-bot/gh-1991'
git switch 'main'
git merge --ff-only 'github-bot/gh-1991'
git switch 'main'
git merge 'github-bot/gh-1991'
git push origin 'main'
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!1991
No description provided.