Tests: skip D3D12 WARP fallback when Wine lacks the adapter #1411

Open
github-bot wants to merge 2 commits from github-bot/gh-1411 into main AGit
Owner

@⁠gurvancampion on GitHub · 2026-11-24 15:42 UTC · original
gurvancampion:topic/wine-warp-tests → main · +93 −26 · 10 files · 2 commits · open

Ten D3D12 unit tests panic when their hardware device attempt fails and Wine's built-in DXGI returns
E_NOTIMPL from EnumWarpAdapter. Report SKIPPED …: no WARP for that specific Wine result.
The frame-dump test is covered separately in #957.

 D3D12CreateDevice(None, D3D_FEATURE_LEVEL_11_0, &mut dev) -> Err
   CreateDXGIFactory1()
-  factory.EnumWarpAdapter().expect("WARP")          # panics on Wine E_NOTIMPL
+  warp_tests::enum_warp_adapter(&factory)
+    under_wine() && E_NOTIMPL -> skip_test("no WARP") and return
+    any other Err             -> panic!("WARP: {err:?}")
   D3D12CreateDevice(&warp, D3D_FEATURE_LEVEL_11_0, &mut dev)

What is in it

  • crates/xcl/src/hle/d3d12x/warp_tests.rs (wired via #[cfg(test)] mod warp_tests; in mod.rs) shares the Wine E_NOTIMPL check across the ten test sites in bind.rs, console_heap.rs, cpu_writes.rs, fence_x.rs, list_x.rs, real.rs (2 sites), and sparse.rs (3 sites), and adds a unit test (warp_adapter_absence_requires_wine_and_not_implemented) for HRESULT and host classification. Native Windows errors, other enumeration errors, and WARP device creation failures still fail the test.

Tested

  • Hardware / environment: Ryzen 7 9800X3D, RTX 5090 (NVIDIA 615.78.08 installed), Arch Linux, GE-Proton 11-12, Vulkan disabled and Wine's built-in DXGI with renderer=no3d. Debug x86_64-pc-windows-msvc cross-build with Rust 1.99.0 and cargo-xwin 0.24.1.
  • cargo xwin test --workspace --target x86_64-pc-windows-msvc --no-fail-fast -- --test-threads=4 on base 930e8b4 and head fd77d7e:
    • Base 930e8b4: 737 passed, 14 failed, 41 ignored (108 explicit skips).
    • Head fd77d7e: 748 passed, 4 failed, 41 ignored (118 explicit skips, +10 no WARP). The 4 remaining failures are the frame-dump test (#957), XMA2 (#890), synthetic-title e2e, and PLS quota (#810 / #937).
  • Targeted runs with --nocapture: all 10 changed tests report SKIPPED …: no WARP; all 10 fail when XCL_REQUIRE_GPU=wave64 or XCL_REQUIRE_GPU=mesh is set. The new unit test passed and failed against a negative control that rejected every HRESULT.
  • rustfmt --check --edition 2021 crates/xcl/src/hle/d3d12x/warp_tests.rs and git diff --check origin/main HEAD: passed.

Regression run

The diff is compiled only under #[cfg(test)] (no runtime code changes). python3 scripts/pr_check.py --local --test-only returns description ok; the hosted check requires the maintainer test-only label to waive retail smoke for this revision.

Not tested

  • Native Windows, a working WARP device, GPU-backed execution, release builds, and retail titles.

AI use

  • OpenAI Codex (gpt-6.2-sol) checked upstream, wrote the patch and regression test, ran the before/after comparisons, and drafted this description. Antigravity (Gemini 4 Neon) coordinated, reviewed the diff, and verified the PR checks. The author reviewed the diff and description before opening the PR.
**@⁠gurvancampion** on GitHub · 2026-11-24 15:42 UTC · [original](https://github.com/xcl-dev/xcl/pull/1411) `gurvancampion:topic/wine-warp-tests` → `main` · +93 −26 · 10 files · 2 commits · open Ten D3D12 unit tests panic when their hardware device attempt fails and Wine's built-in DXGI returns `E_NOTIMPL` from `EnumWarpAdapter`. Report `SKIPPED …: no WARP` for that specific Wine result. The frame-dump test is covered separately in #957. ```diff D3D12CreateDevice(None, D3D_FEATURE_LEVEL_11_0, &mut dev) -> Err CreateDXGIFactory1() - factory.EnumWarpAdapter().expect("WARP") # panics on Wine E_NOTIMPL + warp_tests::enum_warp_adapter(&factory) + under_wine() && E_NOTIMPL -> skip_test("no WARP") and return + any other Err -> panic!("WARP: {err:?}") D3D12CreateDevice(&warp, D3D_FEATURE_LEVEL_11_0, &mut dev) ``` **What is in it** - `crates/xcl/src/hle/d3d12x/warp_tests.rs` (wired via `#[cfg(test)] mod warp_tests;` in `mod.rs`) shares the Wine `E_NOTIMPL` check across the ten test sites in `bind.rs`, `console_heap.rs`, `cpu_writes.rs`, `fence_x.rs`, `list_x.rs`, `real.rs` (2 sites), and `sparse.rs` (3 sites), and adds a unit test (`warp_adapter_absence_requires_wine_and_not_implemented`) for HRESULT and host classification. Native Windows errors, other enumeration errors, and WARP device creation failures still fail the test. **Tested** - Hardware / environment: Ryzen 7 9800X3D, RTX 5090 (NVIDIA 615.78.08 installed), Arch Linux, GE-Proton 11-12, Vulkan disabled and Wine's built-in DXGI with `renderer=no3d`. Debug `x86_64-pc-windows-msvc` cross-build with Rust 1.99.0 and cargo-xwin 0.24.1. - `cargo xwin test --workspace --target x86_64-pc-windows-msvc --no-fail-fast -- --test-threads=4` on base `930e8b4` and head `fd77d7e`: - Base `930e8b4`: 737 passed, 14 failed, 41 ignored (108 explicit skips). - Head `fd77d7e`: 748 passed, 4 failed, 41 ignored (118 explicit skips, +10 `no WARP`). The 4 remaining failures are the frame-dump test (#957), XMA2 (#890), synthetic-title e2e, and PLS quota (#810 / #937). - Targeted runs with `--nocapture`: all 10 changed tests report `SKIPPED …: no WARP`; all 10 fail when `XCL_REQUIRE_GPU=wave64` or `XCL_REQUIRE_GPU=mesh` is set. The new unit test passed and failed against a negative control that rejected every HRESULT. - `rustfmt --check --edition 2021 crates/xcl/src/hle/d3d12x/warp_tests.rs` and `git diff --check origin/main HEAD`: passed. **Regression run** The diff is compiled only under `#[cfg(test)]` (no runtime code changes). `python3 scripts/pr_check.py --local --test-only` returns `description ok`; the hosted check requires the maintainer `test-only` label to waive retail smoke for this revision. **Not tested** - Native Windows, a working WARP device, GPU-backed execution, release builds, and retail titles. **AI use** - OpenAI Codex (`gpt-6.2-sol`) checked upstream, wrote the patch and regression test, ran the before/after comparisons, and drafted this description. Antigravity (`Gemini 4 Neon`) coordinated, reviewed the diff, and verified the PR checks. The author reviewed the diff and description before opening the PR.
Wine's built-in DXGI returns E_NOTIMPL from EnumWarpAdapter. Report the missing adapter with the shared GPU skip helper, which still fails in strict mode. Keep other enumeration and WARP device creation errors fatal.

Assisted-by: Codex (GPT-6, exact variant unavailable)
#2345's test_state_with_reserved and the compositor test in present.rs
still panicked on EnumWarpAdapter when Wine's built-in DXGI returns
E_NOTIMPL. They now use the warp_tests helper, so both flush_parked tests
and the compositor test report "no WARP", fail in strict mode, and keep
other enumeration errors fatal.

Assisted-by: Claude Code (Claude Opus 5.5)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:53:08 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 15:55 UTC · original · edited 2026-11-24 16:03 UTC

Full-suite run, since this PR has no test report yet. Tested exact head fd77d7e (on its base 930e8b4).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 752 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: warp_adapter_absence_requires_wine_and_not_implemented.
  • Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 752 passed, 0 failed, 41 ignored, no skips.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 15:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/1411#issuecomment-7136840116) · edited 2026-11-24 16:03 UTC Full-suite run, since this PR has no test report yet. Tested exact head `fd77d7e` (on its base `930e8b4`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4`: **752 passed, 0 failed, 41 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `warp_adapter_absence_requires_wine_and_not_implemented`. - Same head on the AMD Radeon iGPU of the 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **752 passed, 0 failed, 41 ignored**, no skips. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 17:08 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 17:08 UTC · [original](https://github.com/xcl-dev/xcl/pull/1411#issuecomment-7138747520) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~21 ignored. Thanks!
Author
Owner

@⁠Toons29 on GitHub · 2026-11-25 03:29 UTC · original

Regression run of fd77d7e2 on the retail title, for this PR's Regression run section. Both blocks are from scripts/smoke.ps1 as printed, not edited: main on 4178e888, this PR on its head commit with no uncommitted changes, same title and time.

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1618 (PresentX 1618)
presents per 2 s (last 3): 61 60 60
device removals: 0
crashes: 0
peak commit: 14831 MB
xcl-smoke v1
commit: fd77d7e20f6a429cdea25412ac4d471a670ddbaa
gpu: AMD Radeon RX 9070
title: game.exe
seconds: 60
exit: 0x0
frames shown: 1632 (PresentX 1632)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14815 MB

Against the limits in CONTRIBUTING.md: 101 % of main's frames, 100 % of its peak commit, no crash, no device removal.

AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, cargo build --release -p xcl, 60 s, XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.

AI use: Claude Code (Claude Opus 5.5) built both trees and ran scripts/smoke.ps1; I checked the blocks before posting.

**@⁠Toons29** on GitHub · 2026-11-25 03:29 UTC · [original](https://github.com/xcl-dev/xcl/pull/1411#issuecomment-7151959096) Regression run of `fd77d7e2` on the retail title, for this PR's **Regression run** section. Both blocks are from `scripts/smoke.ps1` as printed, not edited: `main` on `4178e888`, this PR on its head commit with no uncommitted changes, same title and time. ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1618 (PresentX 1618) presents per 2 s (last 3): 61 60 60 device removals: 0 crashes: 0 peak commit: 14831 MB ``` ``` xcl-smoke v1 commit: fd77d7e20f6a429cdea25412ac4d471a670ddbaa gpu: AMD Radeon RX 9070 title: game.exe seconds: 60 exit: 0x0 frames shown: 1632 (PresentX 1632) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14815 MB ``` Against the limits in CONTRIBUTING.md: 101 % of `main`'s frames, 100 % of its peak commit, no crash, no device removal. AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, `cargo build --release -p xcl`, 60 s, `XCL_NETWORK=0`. This is a regression check only: it does not show whether the run reaches the code this PR changes. AI use: Claude Code (Claude Opus 5.5) built both trees and ran `scripts/smoke.ps1`; I checked the blocks before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 05:13 UTC · original

Re-verification on RTX 3060 Ti (Windows 11), new head merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.

Thanks!

— Devin

**@⁠DavidM1911** on GitHub · 2026-11-26 05:13 UTC · [original](https://github.com/xcl-dev/xcl/pull/1411#issuecomment-7183286567) Re-verification on RTX 3060 Ti (Windows 11), new head merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved. Thanks! — Devin
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/1411/head:github-bot/gh-1411'
git switch 'github-bot/gh-1411'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1411'
git switch 'github-bot/gh-1411'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1411'
git switch 'github-bot/gh-1411'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1411'
git switch 'main'
git merge --squash 'github-bot/gh-1411'
git switch 'main'
git merge --ff-only 'github-bot/gh-1411'
git switch 'main'
git merge 'github-bot/gh-1411'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.