Tests: a machine with no GPU has no hardware adapter to check shaders on #1923

Merged
fiestorra merged 1 commit from upstream-pr/1925 into main 2026-11-25 01:12:31 +00:00
fiestorra commented 2026-11-25 01:04:35 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fiestorra on 2026-11-25T01:04:35Z.


CI is red on main itself, on the same two tests every run, and the fix in 42363ab does not reach them

My pull request failed its check, so I looked at what failed and then at whether main fails the same way. It does — run 45520251168 on 42363ab:

emit::synthetic_tests::gathers_at_a_level_match_the_hardware ... FAILED
  hardware: lane 4 against its gather
    left: [66.0, 67.0, 35.0, 34.0]   right: [65.0, 66.0, 34.0, 33.0]
emit::synthetic_tests::permutes_read_the_lane_named_and_zero_from_lanes_left_out ... FAILED
  hardware: no pipeline for a wave of 32

Both are the hardware-only checks the commit 42363ab was written to skip on a machine without a GPU. They still run there, and the reason is in the shape of the check: it refuses a default adapter whose DXGI_ADAPTER_FLAG_SOFTWARE bit is set, but on the runner the default adapter is not flagged software — and its device still refuses a wave of 32, which is what the second failure says in so many words. So Host::new(false) succeeds, the tests believe they are on a GPU, and they take the hardware path.

The fix I have (#1943) asks for an adapter that is a GPU by two signs rather than one: not flagged software and with dedicated video memory of its own. WARP and the basic render driver report none, so a runner has no hardware adapter, Host::new(false) fails with "no hardware adapter", and both tests take the skip they already have. On a machine with a real card nothing changes — the adapter is the first one that has its own memory, which on a laptop with an integrated GPU is the same device DXGI picked before.

Verification on this machine (RTX 4090 plus an integrated AMD, both with dedicated memory, session 0): cargo test -p victory-shader --locked --lib 246 passed, 3 ignored; the two tests run and pass there; cargo clippy --workspace --all-targets with and without --all-features clean under -D warnings; rustfmt --check on the file at one pre-existing hunk, the same as main.

I cannot run the runner itself, so the claim I am making is precise and limited: the failure says the "hardware" device cannot make a wave of 32, and a device with no dedicated video memory is not one of the machines those two checks are for. If the runner does have dedicated memory on a virtual adapter, my check will not skip and the tests will fail again — in that case the honest fix is to make the permute test skip on a refused pipeline whatever the adapter says, and I would rather do that with someone who can see the runner.

The same comment applies to the rest of my open pull requests: their checks are red for this reason, not for their content.

Written with an AI assistant.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6594724996 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1925). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-25T01:04:35Z. --- **CI is red on `main` itself, on the same two tests every run, and the fix in `42363ab` does not reach them** My pull request failed its check, so I looked at what failed and then at whether `main` fails the same way. It does — run [`45520251168`](https://github.com/Marvisak/VIctory/actions/runs/45520251168) on `42363ab`: ``` emit::synthetic_tests::gathers_at_a_level_match_the_hardware ... FAILED hardware: lane 4 against its gather left: [66.0, 67.0, 35.0, 34.0] right: [65.0, 66.0, 34.0, 33.0] emit::synthetic_tests::permutes_read_the_lane_named_and_zero_from_lanes_left_out ... FAILED hardware: no pipeline for a wave of 32 ``` Both are the hardware-only checks the commit `42363ab` was written to skip on a machine without a GPU. They still run there, and the reason is in the shape of the check: it refuses a default adapter whose `DXGI_ADAPTER_FLAG_SOFTWARE` bit is set, but on the runner the default adapter is **not** flagged software — and its device still refuses a wave of 32, which is what the second failure says in so many words. So `Host::new(false)` succeeds, the tests believe they are on a GPU, and they take the hardware path. **The fix I have** ([#1943](https://github.com/Marvisak/VIctory/pull/1943)) asks for an adapter that is a GPU by two signs rather than one: not flagged software **and** with dedicated video memory of its own. WARP and the basic render driver report none, so a runner has no hardware adapter, `Host::new(false)` fails with "no hardware adapter", and both tests take the skip they already have. On a machine with a real card nothing changes — the adapter is the first one that has its own memory, which on a laptop with an integrated GPU is the same device DXGI picked before. Verification on this machine (RTX 4090 plus an integrated AMD, both with dedicated memory, session 0): `cargo test -p victory-shader --locked --lib` **246 passed, 3 ignored**; the two tests run and pass there; `cargo clippy --workspace --all-targets` with and without `--all-features` clean under `-D warnings`; `rustfmt --check` on the file at one pre-existing hunk, the same as `main`. I cannot run the runner itself, so the claim I am making is precise and limited: **the failure says the "hardware" device cannot make a wave of 32, and a device with no dedicated video memory is not one of the machines those two checks are for**. If the runner does have dedicated memory on a virtual adapter, my check will not skip and the tests will fail again — in that case the honest fix is to make the permute test skip on a refused pipeline whatever the adapter says, and I would rather do that with someone who can see the runner. The same comment applies to the rest of my open pull requests: their checks are red for this reason, not for their content. Written with an AI assistant.
upstream-sync closed this pull request 2026-11-25 02:05:31 +00:00
WhiteAssassins commented 2026-11-25 02:05:32 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by WhiteAssassins on 2026-11-25T01:07:46Z.

Review: COMMENTED


Reviewed the diff against 42363ab and the failing main run (45520251168).

  • The diagnosis is right, and requiring dedicated video memory does exclude WARP and the Basic Render Driver; CI is now green on the runner, which answers the open question in the description.
  • Behaviour change beyond CI: Host::new(false) no longer takes adapter 0 but the first adapter with dedicated memory. The runtime (victory-gpu, D3D12CreateDevice(None) at crates/victory-gpu/src/host.rs:189) still uses the default adapter, so on a machine whose adapter 0 reports no dedicated memory (some integrated GPUs on shared memory) victory translate --pipelines (apps/victory/src/translate.rs:177) would check pipelines on a different GPU than the one the title runs on. Rare, but it is a silent difference; checking only adapter 0, as #1919 does, avoids it.
  • Any EnumAdapters1 error, not only DXGI_ERROR_NOT_FOUND, ends the loop as "no hardware adapter"; fine for tests, just noting it.
  • The description links the fix as #1943, which does not exist; it reads as if it means this PR.

Overlaps with #1919, which fixes the same two tests with a one-condition change.

Reviewed with Claude Code.

<!-- greyfinch-sync:Marvisak/VIctory:review:6049994484 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1925#pullrequestreview-6049994484). Originally posted by [WhiteAssassins](https://github.com/WhiteAssassins) on 2026-11-25T01:07:46Z. **Review:** COMMENTED --- Reviewed the diff against `42363ab` and the failing `main` run (45520251168). - The diagnosis is right, and requiring dedicated video memory does exclude WARP and the Basic Render Driver; CI is now green on the runner, which answers the open question in the description. - Behaviour change beyond CI: `Host::new(false)` no longer takes adapter 0 but the first adapter with dedicated memory. The runtime (`victory-gpu`, `D3D12CreateDevice(None)` at `crates/victory-gpu/src/host.rs:189`) still uses the default adapter, so on a machine whose adapter 0 reports no dedicated memory (some integrated GPUs on shared memory) `victory translate --pipelines` (`apps/victory/src/translate.rs:177`) would check pipelines on a different GPU than the one the title runs on. Rare, but it is a silent difference; checking only adapter 0, as #1919 does, avoids it. - Any `EnumAdapters1` error, not only `DXGI_ERROR_NOT_FOUND`, ends the loop as "no hardware adapter"; fine for tests, just noting it. - The description links the fix as #1943, which does not exist; it reads as if it means this PR. Overlaps with #1919, which fixes the same two tests with a one-condition change. Reviewed with Claude Code.
fiestorra commented 2026-11-25 02:05:47 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by fiestorra on 2026-11-25T01:09:56Z.


The check is green with this change, and it is the one that unblocks the rest of my pull requests

Its own run: 45522997715 — check completed/success on the Windows runner. The two tests that fail on every run of main (gathers_at_a_level_match_the_hardware and permutes_read_the_lane_named_and_zero_from_lanes_left_out) now take their skip, because the test host has no adapter with dedicated video memory to call hardware.

That also says something about the diagnosis rather than the symptom: the runner's default adapter is not flagged software, so the check added in 42363ab did not catch it, and the device it produced could not make a wave of 32. Asking for video memory of its own is what separates that machine from a real one.

What it means for the queue: main is red for this reason, so every pull request based on it is red too — including four of mine (#1914, #1832, #1767, #1630), none of which touches the shader test host. I have stacked those four on top of this branch so their checks can run and go green, and I will rebase them onto main the moment this lands. Nothing in them depends on this change; the extra commit is there so a reviewer sees a green check instead of a red one they would have to read the log of.

If it is easier the other way round — merge this first and let me rebase — that works too, and it is what I would prefer.

No game data is involved: adapter descriptions, test names and counts.

Written with an AI assistant.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149271444 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1925#issuecomment-7149271444). Originally posted by [fiestorra](https://github.com/fiestorra) on 2026-11-25T01:09:56Z. --- **The check is green with this change, and it is the one that unblocks the rest of my pull requests** Its own run: [`45522997715`](https://github.com/Marvisak/VIctory/actions/runs/45522997715) — `check` **completed/success** on the Windows runner. The two tests that fail on every run of `main` (`gathers_at_a_level_match_the_hardware` and `permutes_read_the_lane_named_and_zero_from_lanes_left_out`) now take their skip, because the test host has no adapter with dedicated video memory to call hardware. That also says something about the diagnosis rather than the symptom: the runner's default adapter is not flagged software, so the check added in `42363ab` did not catch it, and the device it produced could not make a wave of 32. Asking for video memory of its own is what separates that machine from a real one. **What it means for the queue**: `main` is red for this reason, so every pull request based on it is red too — including four of mine (#1914, #1832, #1767, #1630), none of which touches the shader test host. I have stacked those four **on top of this branch** so their checks can run and go green, and I will rebase them onto `main` the moment this lands. Nothing in them depends on this change; the extra commit is there so a reviewer sees a green check instead of a red one they would have to read the log of. If it is easier the other way round — merge this first and let me rebase — that works too, and it is what I would prefer. No game data is involved: adapter descriptions, test names and counts. Written with an AI assistant.
catminou4 commented 2026-11-25 03:02:49 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-25T02:49:11Z.

Review: APPROVED


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. No-GPU machines now skip the hardware-adapter check instead of failing — pairs with #1911/#1919 (same skip-logic cluster, those two conflict with main and need rebases).

<!-- greyfinch-sync:Marvisak/VIctory:review:6051093163 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1925#pullrequestreview-6051093163). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T02:49:11Z. **Review:** APPROVED --- 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. No-GPU machines now skip the hardware-adapter check instead of failing — pairs with #1911/#1919 (same skip-logic cluster, those two conflict with main and need rebases).
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!1923
No description provided.