From 3c43506fbdf9872a1efb7ead385c0604c354e52e Mon Sep 17 00:00:00 2001 From: vakaobr <15154330+vakaobr@users.noreply.github.com> Date: Tue, 24 Nov 2026 06:25:45 -0300 Subject: [PATCH] Tests: skip the WARP frame-dump test where WARP is unavailable 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. (#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) --- crates/xcl/src/hle/d3d12x/present.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/xcl/src/hle/d3d12x/present.rs b/crates/xcl/src/hle/d3d12x/present.rs index 01b3c92a4a..c741adb5f1 100644 --- a/crates/xcl/src/hle/d3d12x/present.rs +++ b/crates/xcl/src/hle/d3d12x/present.rs @@ -1096,7 +1096,13 @@ mod frame_dump_tests { // WARP needs no physical GPU. Fill a CPU-visible buffer with the same padded // footprint used by a readback, so this exercises write_frame's actual decoder. let factory: IDXGIFactory4 = CreateDXGIFactory2(DXGI_CREATE_FACTORY_FLAGS(0)).unwrap(); - let adapter: IDXGIAdapter = factory.EnumWarpAdapter().unwrap(); + let adapter: IDXGIAdapter = match factory.EnumWarpAdapter() { + Ok(a) => a, + Err(_) => { + crate::gpu::recomp::runner::skip_test("no WARP"); + return; + } + }; let mut dev: Option = None; D3D12CreateDevice(&adapter, D3D_FEATURE_LEVEL_11_0, &mut dev).unwrap(); let dev = dev.unwrap();