Skip to content

Tests: skip the WARP frame-dump test where WARP is unavailable - #957

Open
vakaobr wants to merge 1 commit into
xcl-dev:mainfrom
vakaobr:tests/warp-skip
Open

vakaobr wants to merge 1 commit into
xcl-dev:mainfrom
vakaobr:tests/warp-skip

Conversation

@vakaobr

@vakaobr vakaobr commented Nov 24, 2026 •

Copy link
Copy Markdown

present::frame_dump_tests::mapped_frame_dump_distinguishes_dark_bright_and_undecoded_content uses the WARP adapter to exercise write_frame's decoder without a physical GPU. Apple's D3DMetal (macOS under CrossOver) has no WARP: EnumWarpAdapter returns 0x887A0004 (DXGI_ERROR_UNSUPPORTED) and the unwrap() panics, so the test fails there on main (reported in #258). With this change it reports SKIPPED …: no WARP through runner::skip_test and returns, like the other d3d12x tests that need a device. Part of #258.

What is in it

  • crates/xcl/src/hle/d3d12x/present.rs (test module only): EnumWarpAdapter().unwrap() becomes a match that calls crate::gpu::recomp::runner::skip_test("no WARP") and returns on error.

Tested

  • MacBook Pro M5 Pro (20-core GPU), 48 GB, macOS 27.2.1, CrossOver 26.3.0.39832 with D3DMetal, Rosetta 2. Rust 1.100.0, x86_64-pc-windows-gnu (mingw-w64 GCC 16.2.0), debug, DXC 1.9.2609. Head 3c43506 on main 077ce40.
  • cargo test -p xcl --lib --target x86_64-pc-windows-gnu --no-run, then the test binary in the bottle with --exact hle::d3d12x::present::frame_dump_tests::mapped_frame_dump_distinguishes_dark_bright_and_undecoded_content --test-threads=1 --nocapture: 1 passed, 0 failed, with SKIPPED …: no WARP. With XCL_REQUIRE_GPU=wave64 the same run fails (0 passed, 1 failed), as skip_test does for every reason other than "no mesh shaders".
  • On Windows, main's CI already runs this test's unwrap() without a panic, so EnumWarpAdapter succeeds there and the skip branch is not taken.
  • Independent runs: on Windows, AMD RX 9070 XT (RDNA4), this head merged onto 9aec53d, cargo test --workspace -- --test-threads=4: 713 passed, 3 failed, 41 ignored, the 3 failures being VRAM contention they attribute to the base before D3D12.X: a sparse pool retired a moment ago is taken back (#913) #923, and the frame-dump test runs on WARP without skipping (@eizispark, Tests: skip the WARP frame-dump test where WARP is unavailable #957 (comment)). On a second M5 Pro (x86_64-pc-windows-gnullvm, release), the test fails on main 077ce40 and skips with no WARP at this head (@mikebuckets171, Tests: skip the WARP frame-dump test where WARP is unavailable #957 (comment)).

Regression run

The diff is test-only (inside #[cfg(test)] mod frame_dump_tests in present.rs). The pair below is @mikebuckets171's, pasted unchanged from #957 (comment): M5 Pro, CrossOver 26 + D3DMetal, x86_64-pc-windows-gnullvm release, 60 s on a retail title, a fresh data root per run. On this host main presents nothing, so the pair shows only that the change alters nothing about a run.

main:

xcl-smoke v1
commit: 077ce40c3e371cf3df8c57985b1cc6b1db39e75a
gpu: AMD Compatibility Mode
title: retail (Xbox Series X|S package, private drive)
seconds: 60
exit: 0x0
frames shown: 0 (PresentX 0)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 0 MB

this PR:

xcl-smoke v1
commit: 3c43506fbdf9872a1efb7ead385c0604c354e52e
gpu: AMD Compatibility Mode
title: retail (Xbox Series X|S package, private drive)
seconds: 60
exit: 0x0
frames shown: 0 (PresentX 0)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 0 MB

Not tested

  • The whole suite on a Windows GPU by me (I have no Windows machine); see the independent RX 9070 XT run above.
  • The release build.

AI use

  • Claude Code with Claude Opus 4.6 wrote the first version of the change and tested it on macOS. Claude Code with Claude Opus 5.5 rebased it onto 077ce40, switched it to runner::skip_test, reran the test on the Mac at 3c43506 and wrote this description.

D3DMetal (macOS, CrossOver) has no WARP adapter: EnumWarpAdapter
returns 0x887A0004 (DXGI_ERROR_UNSUPPORTED), and the unwrap panics.
The test uses WARP to exercise write_frame's decoder without a
physical GPU, so it now reports "no WARP" through
runner::skip_test, like the other d3d12x tests that need a device,
and returns. Windows has WARP, so nothing changes there. (xcl-dev#258)

Assisted-by: Claude Code (Claude Opus 4.6 wrote the change; Claude Opus 5.5 rebased it onto 077ce40 and switched it to skip_test)
@vakaobr

vakaobr commented Nov 24, 2026

Copy link
Copy Markdown
Author

@ivall this is a test-only diff inside #[cfg(test)] mod frame_dump_tests in present.rs, so PR checks asks for a smoke pair (#452). The workflow handles a test-only label, but the label doesn't exist in the repo yet, so it would need creating before it can be applied. If you'd rather have a smoke pair, @Kalmarv or @mikebuckets171, I'd be grateful for one of main 077ce40 against 3c43506. I can't make it myself, because I don't own a title. I'd paste it into the description unchanged, credited to you.

@eizispark

Copy link
Copy Markdown

Hardware check of 3c43506fbdf9872a1efb7ead385c0604c354e52e (verified clean merge with main 9aec53d): pass.

Tested

  • Hardware: AMD Radeon RX 9070 XT (RDNA4, driver 32.0.32015.16001), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11, rustc 1.100.0 (0ef1bc386 2026-11-09), release + test profile
  • cargo test --workspace -- --test-threads=4: 713 passed, 3 failed, 41 ignored (GPU tests skipped on this adapter: none; the 3 failures are pre-D3D12.X: a sparse pool retired a moment ago is taken back (#913) #923 concurrent VRAM contention on base 077ce40 in hle::d3d12x::title_textures::tests::placed_title_textures_share_vram_and_preserve_pixels plus two downstream PoisonErrors in transitions_apply_when_their_list_is_submitted and d32s8_targets_take_their_own_size_of_video_memory)
  • cargo test -p xcl --lib hle::d3d12x -- --test-threads=1: 115 passed, 0 failed, 1 ignored
  • hle::d3d12x::present::frame_dump_tests::mapped_frame_dump_distinguishes_dark_bright_and_undecoded_content (--nocapture): ok (runs natively via Windows WARP without hitting skip_test)

Regression run
main (6bac4b4):

xcl-smoke v1
commit: 6bac4b4419886acc940d479dcf8815d0b1804435
gpu: AMD Radeon RX 9070 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1669 (PresentX 1669)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14860 MB

PR (3c43506):

xcl-smoke v1
commit: 3c43506fbdf9872a1efb7ead385c0604c354e52e
gpu: AMD Radeon RX 9070 XT
title: GTA6.Xbox.v1.0.2.1
seconds: 60
exit: 0x0
frames shown: 1661 (PresentX 1661)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14732 MB

Not tested

  • environments where EnumWarpAdapter is unavailable (macOS CrossOver / D3DMetal); wave32-only GPUs; gameplay past the menus

AI use

  • Antigravity (Gemini 4 Carbon) ran the build, test suite, and scripts/smoke.ps1 harness on this machine and formatted this report.

@SlopTart

Copy link
Copy Markdown

Linux / AMD RDNA3 datapoint.

Merged state: head 3c43506 onto main 9aec53d, clean merge.

Full suite, cargo test --workspace --release --no-fail-fast --target x86_64-pc-windows-gnu -- --test-threads=4: 717 passed, 7 failed, 41 ignored; failures are the known Wine-lane set from my #42 rows. WARP frame-dump skip logic green (WARP absent here, test correctly skipped).

Not tested: retail titles (none here), Windows, RDNA4.
Counts only, no game data.

Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross x86_64-pc-windows-gnu, XCL_NETWORK=0, release profile, --test-threads=4. My Linux rows: #42 / #718.

AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting.

@upipibi upipibi mentioned this pull request Nov 24, 2026
@mikebuckets171

Copy link
Copy Markdown

The pair you asked for, plus the test's own before/after - which is the part that actually shows something.

Host: MacBook Pro M5 Pro (48 GB), macOS 27.2.1, CrossOver 26 with D3DMetal (adapter reports "AMD Compatibility Mode"), Rosetta 2, Rust 1.100.0, x86_64-pc-windows-gnullvm with LLVM-MinGW 20261117 (clang 23.1.6), --release --locked, test binaries run under Wine. Each test in its own process: --exact <full test path> --nocapture --test-threads=1.

The named test, both sides (hle::d3d12x::present::frame_dump_tests::mapped_frame_dump_distinguishes_dark_bright_and_undecoded_content, the lib test binary has 696 tests on both sides):

  • main 077ce40: FAILED - panicked at crates/xcl/src/hle/d3d12x/present.rs:1099:67 (the unwrap() on EnumWarpAdapter), test result: FAILED. 0 passed; 1 failed, exit 0x65.
  • head 3c43506: SKIPPED hle::d3d12x::present::frame_dump_tests::mapped_frame_dump…: no WARP, test result: ok. 1 passed; 0 failed, exit 0x0.

So the skip fires here, on the gnullvm target as well as on the GNU and clang-cl builds the other Mac reports describe, and it reaches the skip from the same host answer: a plain D3D12 program (no XCL) on this host gets CreateDXGIFactory2 → S_OK, EnumWarpAdapter → 0x887A0004 (DXGI_ERROR_UNSUPPORTED), and EnumAdapters1 enumerates exactly one adapter - vendor 0x1002 device 0x66af, 40960 MB dedicated, flags 0x0, the D3DMetal shim's compatibility adapter. There is no second adapter to fall back to.

xcl-smoke v1 pair, 60 s each, fresh data root per run (XCL_RUN_SECONDS=60, so the title ends itself and the frame/present counts are its own):

xcl-smoke v1
commit: 077ce40c3e371cf3df8c57985b1cc6b1db39e75a
gpu: AMD Compatibility Mode
title: retail (Xbox Series X|S package, private drive)
seconds: 60
exit: 0x0
frames shown: 0 (PresentX 0)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 0 MB
xcl-smoke v1
commit: 3c43506fbdf9872a1efb7ead385c0604c354e52e
gpu: AMD Compatibility Mode
title: retail (Xbox Series X|S package, private drive)
seconds: 60
exit: 0x0
frames shown: 0 (PresentX 0)
presents per 2 s (last 3): 0 0 0
device removals: 0
crashes: 0
peak commit: 0 MB

Read them for what they are: on this host a main built straight from upstream makes 0 presents and 0 draws at all, so a Mac pair for a test-only diff can only show that the change alters nothing about a run - identical counts, exit 0x0 on both sides, no crashes, no device removals. The test result above is the evidence that matters here, and it is the one the PR's own description predicted.

Host: macOS 27.2.1 (Apple silicon, M5 Pro), CrossOver 26, D3DMetal; local inference unloaded and the bottle's wineserver stopped for each run. AI use: GPT-6 Luna built both trees, ran the test and the two 60 s runs, and drafted this comment; the counts and codes are from those runs.

@shortside

Copy link
Copy Markdown

Test report from a second Mac, head 3c43506 against its merge base 077ce40.

Tested

  • MacBook Pro M5 Pro, macOS 27.2.1, Rosetta 2; CrossOver 26.3 (Wine 11.0), Windows 10 bottle, D3DMetal; DXC 1.9.2609. Cross-built for x86_64-pc-windows-msvc with clang-cl / lld-link 23.1.6 and an xwin SDK 10.0.26100, Rust 1.100.0, debug. The lib test binary run under Wine, one test per process (--exact --nocapture, 60 s cap).
  • hle::d3d12x::present::frame_dump_tests::mapped_frame_dump_distinguishes_dark_bright_and_undecoded_content: base failed (unwrap() on 0x887A0004); head passed with SKIPPED … no WARP.

Not tested

  • Windows (where the test should still run, not skip), the rest of the suite.

AI use

  • Claude Code with Claude Fable 5.2 built both commits, ran the tests and wrote this report.

@DavidM1911

Copy link
Copy Markdown
Contributor

Independent verification, merged onto current main 384f7f7 locally (clean merge).

Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.

  • cargo test -p xcl --lib frame_dump: 2 passed, 0 failed — WARP is available on this machine so the skip branch is not taken; the EnumWarpAdapter error path now correctly calls skip_test("no WARP") for hosts without it.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

@JJAutoCompare

Copy link
Copy Markdown

Empirical test report (3c43506)

PR #957 head 3c43506fbdf9872a1efb7ead385c0604c354e52e.

Hardware / environment

  • Windows x64 build 26200 on an AMD Family 23 Model 113 Stepping 0 CPU. The host uses an Intel Arc A770 test lock. The fixture explicitly selects the Microsoft WARP software adapter.
  • rustc 1.100.0 (0ef1bc386 2026-11-09) and DXC 1.9.2609.5 (01b62ad47). Cargo used the unoptimized test profile with incremental compilation and debug info disabled.

Commands and results

  • cargo test --workspace --no-run exited 0 outside the Arc lock. It built the workspace test executables without running them.

  • Ran the compiled xcl library test executable under Invoke-ArcTest.ps1 with XCL_ADAPTER=A770 and RUST_TEST_NOCAPTURE=1. The exact invocation inside the lock was:

    $focusedExe = Join-Path $env:CARGO_TARGET_DIR 'debug\build\xcl\77aca8ccb20e299f\out\xcl-77aca8ccb20e299f.exe'
    & $focusedExe 'hle::d3d12x::present::frame_dump_tests::mapped_frame_dump_distinguishes_dark_bright_and_undecoded_content' --exact
  • The focused command exited 0. The log recorded 1 passed, 0 failed, 0 ignored, 0 skipped and 695 filtered out. The fixture finished in 0.03 s. Skip count comes from case-sensitive SKIPPED lines.

Observed behavior

WARP enumeration succeeded on this Windows host. The fixture passed its assertions for dark and bright mapped content, row padding, preservation of frame stats after an intermediate target dump, and the distinction between undecoded and dark content.

Not tested

The full GPU workspace suite and game smoke runs were omitted. The WARP-unavailable skip branch was untested because WARP was available on this host.

AI use

Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr957-focused.log and published.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants