Shader tests: the runner's Basic Render Driver counts as software, which its flags don't say #1917

Closed
BastienRodz wants to merge 1 commit from upstream-pr/1919 into main
BastienRodz commented 2026-11-25 00:56:34 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by BastienRodz on 2026-11-25T00:56:34Z.


What's wrong

42363ab makes the shader test host refuse a software default adapter, so that hardware-only checks don't run on WARP. It checks only DXGI_ADAPTER_FLAG_SOFTWARE:

if adapter.GetDesc1().map_err(err)?.Flags & DXGI_ADAPTER_FLAG_SOFTWARE.0 as u32 != 0

GitHub's Windows runner exposes the Microsoft Basic Render Driver (vendor 0x1414, device 0x8c), which is WARP but doesn't set that flag. CI on main at 42363ab still fails the same two tests (https://github.com/Marvisak/VIctory/actions/runs/45520251168):

  • emit::synthetic_tests::gathers_at_a_level_match_the_hardware: 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.

Every open PR's CI is red because of them.

@imjustprism's probe on the runner shows the cause directly: adapter 0 is "Microsoft Basic Render Driver" vendor 0x1414 device 0x8c flags 0x0, adapter 1 is the same driver with flags 0x2 (the one EnumWarpAdapter returns), and D3D12CreateDevice(None) takes adapter 0. Microsoft's DXGI overview ("New info about enumerating adapters for Windows 8") describes this case: with no working display driver, the primary adapter is the Basic Render Driver (0x1414 / 0x8c), with outputs and without DXGI_ADAPTER_FLAG_SOFTWARE.

What the fix does

Host::new(false) also refuses the adapter when it is the Basic Render Driver by its ids (VendorId == 0x1414 && DeviceId == 0x8c), the check #1752 used. One condition in crates/victory-shader/src/emit/host.rs. Real hardware is unaffected.

Tests

On GitHub's windows-latest with the upstream CI's commands (clippy -D warnings with and without --all-features, then cargo test --workspace --locked), everything passes, and victory-shader has 246 passed and 0 failed, both tests included: https://github.com/BastienRodz/VIctory/actions/runs/45521523469

No game data used. AI-assisted with Claude Code.

🤖 Generated with Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:issue:6594630982 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1919). Originally posted by [BastienRodz](https://github.com/BastienRodz) on 2026-11-25T00:56:34Z. --- ## What's wrong `42363ab` makes the shader test host refuse a software default adapter, so that hardware-only checks don't run on WARP. It checks only `DXGI_ADAPTER_FLAG_SOFTWARE`: ```rust if adapter.GetDesc1().map_err(err)?.Flags & DXGI_ADAPTER_FLAG_SOFTWARE.0 as u32 != 0 ``` GitHub's Windows runner exposes the Microsoft Basic Render Driver (vendor `0x1414`, device `0x8c`), which is WARP but doesn't set that flag. CI on `main` at `42363ab` still fails the same two tests (https://github.com/Marvisak/VIctory/actions/runs/45520251168): - `emit::synthetic_tests::gathers_at_a_level_match_the_hardware`: `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`. Every open PR's CI is red because of them. @imjustprism's probe on the runner shows the cause directly: adapter 0 is `"Microsoft Basic Render Driver" vendor 0x1414 device 0x8c flags 0x0`, adapter 1 is the same driver with `flags 0x2` (the one `EnumWarpAdapter` returns), and `D3D12CreateDevice(None)` takes adapter 0. Microsoft's DXGI overview ("New info about enumerating adapters for Windows 8") describes this case: with no working display driver, the primary adapter is the Basic Render Driver (0x1414 / 0x8c), with outputs and without `DXGI_ADAPTER_FLAG_SOFTWARE`. ## What the fix does `Host::new(false)` also refuses the adapter when it is the Basic Render Driver by its ids (`VendorId == 0x1414 && DeviceId == 0x8c`), the check #1752 used. One condition in `crates/victory-shader/src/emit/host.rs`. Real hardware is unaffected. ## Tests On GitHub's `windows-latest` with the upstream CI's commands (clippy `-D warnings` with and without `--all-features`, then `cargo test --workspace --locked`), everything passes, and `victory-shader` has 246 passed and 0 failed, both tests included: https://github.com/BastienRodz/VIctory/actions/runs/45521523469 No game data used. AI-assisted with Claude Code. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
imjustprism commented 2026-11-25 01:08:23 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by imjustprism on 2026-11-25T01:06:50Z.


i was about to open the same fix and found this one first, so here is what i measured instead. a probe test on github's windows-latest runner printed:

adapter 0: "Microsoft Basic Render Driver" vendor 0x1414 device 0x8c flags 0x0
adapter 1: "Microsoft Basic Render Driver" vendor 0x1414 device 0x8c flags 0x2
EnumWarpAdapter: adapter 1 (flags 0x2)
D3D12CreateDevice(None): adapter 0, wave lanes 4..4

so the runner lists it twice and the default one has no software flag, which is why 42363ab let it through. microsoft's dxgi overview ("new info about enumerating adapters for windows 8") gives the 0x1414 / 0x8c identity and describes this case: with no working display driver the primary adapter is the basic render driver, with outputs and without DXGI_ADAPTER_FLAG_SOFTWARE.

the same check (flag, or that vendor and device) on top of 42363ab ran the full workflow green on my fork's runner, 702 passed, both gathers_at_a_level_match_the_hardware and permutes_read_the_lane_named_and_zero_from_lanes_left_out ok: https://github.com/imjustprism/VIctory/actions/runs/45522777941

if unit tests for the check are wanted (basic render driver without the flag, flagged adapter, a gpu, microsoft's vendor with another device), i have them on imjustprism:tests/basic-render-default-adapter and can send them after this lands.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149219005 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1919#issuecomment-7149219005). Originally posted by [imjustprism](https://github.com/imjustprism) on 2026-11-25T01:06:50Z. --- i was about to open the same fix and found this one first, so here is what i measured instead. a probe test on github's `windows-latest` runner printed: ``` adapter 0: "Microsoft Basic Render Driver" vendor 0x1414 device 0x8c flags 0x0 adapter 1: "Microsoft Basic Render Driver" vendor 0x1414 device 0x8c flags 0x2 EnumWarpAdapter: adapter 1 (flags 0x2) D3D12CreateDevice(None): adapter 0, wave lanes 4..4 ``` so the runner lists it twice and the default one has no software flag, which is why 42363ab let it through. microsoft's dxgi overview ("new info about enumerating adapters for windows 8") gives the 0x1414 / 0x8c identity and describes this case: with no working display driver the primary adapter is the basic render driver, with outputs and without `DXGI_ADAPTER_FLAG_SOFTWARE`. the same check (flag, or that vendor and device) on top of 42363ab ran the full workflow green on my fork's runner, 702 passed, both `gathers_at_a_level_match_the_hardware` and `permutes_read_the_lane_named_and_zero_from_lanes_left_out` ok: https://github.com/imjustprism/VIctory/actions/runs/45522777941 if unit tests for the check are wanted (basic render driver without the flag, flagged adapter, a gpu, microsoft's vendor with another device), i have them on `imjustprism:tests/basic-render-default-adapter` and can send them after this lands.
upstream-sync closed this pull request 2026-11-25 02:05:30 +00:00
WhiteAssassins commented 2026-11-25 02:05:30 +00:00 (Migrated from github.com)

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

Review: COMMENTED


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

  • The diagnosis matches the log: permutes_read_... fails with hardware: no pipeline for a wave of 32, so Host::new(false) accepted the runner's default adapter even though it is the Basic Render Driver.
  • DXGI_ADAPTER_DESC1 in windows 0.62 has VendorId/DeviceId as u32, so the condition is well-typed, and & binds tighter than != in Rust, so the flag test reads as intended.
  • Only adapter 0 is looked at, as before; on a machine with a real GPU nothing changes. Under Proton, vkd3d-proton reports the real GPU's vendor, so it is not refused there either.
  • Side effect worth knowing: Host::new(false) is also what victory translate --pipelines (without --cache) uses (apps/victory/src/translate.rs:177), so on a machine without a GPU that command now stops with "no hardware adapter" instead of checking on WARP. That is consistent with what 42363ab set out to do.

Nits, take or leave: 0x1414/0x8c could be named constants, and pulling the check into a small fn is_software(&DXGI_ADAPTER_DESC1) -> bool would let it get a unit test that needs no GPU.

Overlaps with #1925 (same two tests, different check); this one is the smaller change and its CI is green on the runner.

Reviewed with Claude Code.

<!-- greyfinch-sync:Marvisak/VIctory:review:6049994096 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1919#pullrequestreview-6049994096). Originally posted by [WhiteAssassins](https://github.com/WhiteAssassins) on 2026-11-25T01:07:43Z. **Review:** COMMENTED --- Reviewed the diff against `42363ab` and the failing `main` run (45520251168). - The diagnosis matches the log: `permutes_read_...` fails with `hardware: no pipeline for a wave of 32`, so `Host::new(false)` accepted the runner's default adapter even though it is the Basic Render Driver. - `DXGI_ADAPTER_DESC1` in `windows` 0.62 has `VendorId`/`DeviceId` as `u32`, so the condition is well-typed, and `&` binds tighter than `!=` in Rust, so the flag test reads as intended. - Only adapter 0 is looked at, as before; on a machine with a real GPU nothing changes. Under Proton, vkd3d-proton reports the real GPU's vendor, so it is not refused there either. - Side effect worth knowing: `Host::new(false)` is also what `victory translate --pipelines` (without `--cache`) uses (`apps/victory/src/translate.rs:177`), so on a machine without a GPU that command now stops with "no hardware adapter" instead of checking on WARP. That is consistent with what `42363ab` set out to do. Nits, take or leave: `0x1414`/`0x8c` could be named constants, and pulling the check into a small `fn is_software(&DXGI_ADAPTER_DESC1) -> bool` would let it get a unit test that needs no GPU. Overlaps with #1925 (same two tests, different check); this one is the smaller change and its CI is green on the runner. Reviewed with Claude Code.
BastienRodz commented 2026-11-25 02:05:47 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by BastienRodz on 2026-11-25T01:08:26Z.


Thanks, both. @imjustprism, your probe and the DXGI doc reference are in the description now: they show why the flag alone can't catch it. Your unit tests for the check would be a good follow-up once this lands. @WhiteAssassins: I kept the condition inline to keep the diff to one condition. If the maintainer prefers a named is_software(&DXGI_ADAPTER_DESC1) that imjustprism's tests can target, I'll change it.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149245820 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1919#issuecomment-7149245820). Originally posted by [BastienRodz](https://github.com/BastienRodz) on 2026-11-25T01:08:26Z. --- Thanks, both. @imjustprism, your probe and the DXGI doc reference are in the description now: they show why the flag alone can't catch it. Your unit tests for the check would be a good follow-up once this lands. @WhiteAssassins: I kept the condition inline to keep the diff to one condition. If the maintainer prefers a named `is_software(&DXGI_ADAPTER_DESC1)` that imjustprism's tests can target, I'll change it.
BastienRodz commented 2026-11-25 02:05:48 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by BastienRodz on 2026-11-25T01:14:29Z.


Superseded by ccfb029 on main: it picks the first adapter that isn't flagged software and has dedicated video memory, which leaves out the runner's Basic Render Driver as well. Thanks to imjustprism and WhiteAssassins for the probe and the review.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7149347527 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1919#issuecomment-7149347527). Originally posted by [BastienRodz](https://github.com/BastienRodz) on 2026-11-25T01:14:29Z. --- Superseded by `ccfb029` on `main`: it picks the first adapter that isn't flagged software and has dedicated video memory, which leaves out the runner's Basic Render Driver as well. Thanks to imjustprism and WhiteAssassins for the probe and the review.
catminou4 commented 2026-11-25 03:02:47 +00:00 (Migrated from github.com)

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

Review: COMMENTED


Merge conflict with current main (940d32f69b) — git merge origin/main fails on the PR head; a rebase is needed before this can land. Shader tests: the runner's Basic Render Driver counts as software looks like the right direction; I will re-test after the author rebases. (Note: #1911/#1919/#1925 are the same GPU-skip test cluster — whichever lands second will need to reconcile.)

<!-- greyfinch-sync:Marvisak/VIctory:review:6051093707 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/1919#pullrequestreview-6051093707). Originally posted by [catminou4](https://github.com/catminou4) on 2026-11-25T02:49:14Z. **Review:** COMMENTED --- Merge conflict with current main (940d32f69b) — `git merge origin/main` fails on the PR head; a rebase is needed before this can land. Shader tests: the runner's Basic Render Driver counts as software looks like the right direction; I will re-test after the author rebases. (Note: #1911/#1919/#1925 are the same GPU-skip test cluster — whichever lands second will need to reconcile.)

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