From 04e9cee8442c74c78f5c2e22d4207ecb00413d09 Mon Sep 17 00:00:00 2001 From: HumanlyDev <188223493+HumanlyDev@users.noreply.github.com> Date: Wed, 25 Nov 2026 08:18:11 +0200 Subject: [PATCH] Tests: report texture_states skips on stderr and honor XCL_REQUIRE_GPU Use xcl::gpu::recomp::runner::skip_test on the missing-GPU branch so XCL_REQUIRE_GPU enforces GPU presence and scripts/test.ps1 counts the skip. Write the two missing-debug-layer skip notices directly to stderr so scripts/test.ps1 captures them without breaking XCL_REQUIRE_GPU on GPUs lacking Graphics Tools. Assisted-by: Antigravity (Gemini 4) --- crates/xcl/tests/texture_states.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/xcl/tests/texture_states.rs b/crates/xcl/tests/texture_states.rs index 28d4e9b3e..420141f28 100644 --- a/crates/xcl/tests/texture_states.rs +++ b/crates/xcl/tests/texture_states.rs @@ -48,19 +48,20 @@ unsafe fn transition(r: &ID3D12Resource, sub: u32, before: D3D12_RESOURCE_STATES #[test] fn uploads_start_from_each_subresources_state() { unsafe { + use std::io::Write; match xcl::gpu::agility::configuration_interface::(&CLSID_D3D12Debug) { Ok(d) => d.EnableDebugLayer(), Err(e) => { - println!("SKIPPED uploads_start_from_each_subresources_state: no D3D12 debug layer ({e})"); + let _ = writeln!(std::io::stderr(), "SKIPPED uploads_start_from_each_subresources_state: no D3D12 debug layer ({e})"); return; } } let Ok(dev) = xcl::gpu::agility::create_device(None, D3D_FEATURE_LEVEL_11_0) else { - println!("SKIPPED uploads_start_from_each_subresources_state: no GPU"); + xcl::gpu::recomp::runner::skip_test("no GPU"); return; }; let Ok(q) = dev.cast::() else { - println!("SKIPPED uploads_start_from_each_subresources_state: the device has no debug layer"); + let _ = writeln!(std::io::stderr(), "SKIPPED uploads_start_from_each_subresources_state: the device has no debug layer"); return; }; let queue: ID3D12CommandQueue = dev.CreateCommandQueue(&D3D12_COMMAND_QUEUE_DESC { Type: D3D12_COMMAND_LIST_TYPE_DIRECT, ..Default::default() }).unwrap();