Skip to content

d3d12_clear, d3d12_clear_formats: no WARP reference is a skip (77), not a failure - #8115

Open
XmYx wants to merge 1 commit into
ItsNotRexed:mainfrom
XmYx:tests-skip-no-warp-reference
Open

XmYx wants to merge 1 commit into
ItsNotRexed:mainfrom
XmYx:tests-skip-no-warp-reference

Conversation

@XmYx

@XmYx XmYx commented Nov 23, 2026

Copy link
Copy Markdown

Claim: #7913 (follow-up of #8022)

d3d12_clear and d3d12_clear_formats build a WARP reference device for their differential comparison. When it can't be created they print "WARP reference unavailable: differential test cannot run" and return 1, so ctest reports a failure although nothing was compared. Both tests already declare SKIP_RETURN_CODE 77 (runtime/CMakeLists.txt:1892, :2755), and the repo's convention for a missing reference is a skip (allocator_proxy_test, d3d12_bundle_test, d3d12_rgb96_test).

Change (+6/−4, both hunks inside the reference-device branch):

  • Both tests now print one SKIP <test>: no WARP reference device (differential test cannot run) line and return 77.
  • d3d12_clear_formats still returns 1 if a Vulkan validation error was recorded before that point.
  • In d3d12_clear, the caller's validation-error check still runs first and still fails.
  • A failure to create the layer's own Vulkan device still returns 1, unchanged.

Kept apart from #7603 (sRGB tolerance) and the attachment-aspects claim in d3d12_clear_test.cpp.

Tested. Linux, Wine 10.0 (built-in d3d12 can't create a device), clang-cl 21 + xwin cross build of main dde82f2, RTX 4090 for the layer's Vulkan device:

ctest main this PR
d3d12_clear Failed ***Skipped
d3d12_clear_formats Failed ***Skipped

Negative control: with main's two files rebuilt, both fail again. scripts/check_no_game_data.py is clean. Not run on native Windows, where WARP exists and this branch isn't taken.

Same pattern, not changed here. These tests also return 1 after "WARP reference unavailable" with SKIP_RETURN_CODE 77 set: d3d12_texture1d_target_test.cpp:271, d3d12_typeless_rtv_test.cpp:436 and d3d12_view_slices_test.cpp:177. They didn't reach that branch in my Wine run, so I left them out rather than change code I couldn't exercise.

AI-assisted (Claude Code, Sonnet subagent, reviewed and re-run).

🤖 Generated with Claude Code

…ot a failure

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@tupacfan04 tupacfan04 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two real classification defects, plus a layer-only check that is now skipped unnecessarily.

  1. d3d12_clear_formats_test checks validation before destroying the device. runtime/test/d3d12_clear_formats_test.cpp:342-348 returns 77 inside the WARP-creation-failure block while ours, host, factory and warp are still in scope:
if (FAILED(...)) {
    std::puts("SKIP ...");
    return vk.validation_errors() != errors_before ? 1 : 77;
}

The return expression is evaluated before their destructors, so validation errors emitted while destroying ours (arena, bindless set, staging queue, pipeline cache, Vulkan resources) are never counted. The normal path deliberately destroys the objects first and checks afterwards (:412-417). A real validation failure that should exit 1 becomes 77. Set a warp_missing flag, leave the block so normal destruction/checking runs, then return 77 (or explicitly release ours before the counter).

  1. A real WARP failure is still counted as a skip. d3d12_clear_formats_test.cpp:357-360 and :384-387 treat any non-ok clear_color/clear_depth result as ++tally.skipped. Only Result::not_created means WARP does not expose the format; Result::failed is also returned for command-queue, allocator, command-list, fence, execute and readback failures (:141-167, :181-209). Those are real failures and must increment tally.failed/exit 1, not skip. (Pre-existing, but exactly the classification this PR changes.)

  2. d3d12_clear_test skips a host-independent check. runtime/test/d3d12_clear_test.cpp:418-427 returns 77 before check_unlisted_rtvs(ours.p), which uses only the layer's device and fixed expectations, not host/host_casts. On no-WARP hosts that castable-RTV check no longer runs. Run the host-independent checks before returning 77, or split them into a separate test.

  3. Remaining no-WARP branches (d3d12_texture1d_target_test.cpp:271, d3d12_typeless_rtv_test.cpp:436, d3d12_view_slices_test.cpp:177, d3d12_short_uav_clear_test.cpp:167) still return 1 even though their CTest entries have SKIP_RETURN_CODE 77; on native Windows without WARP they still fail. The PR is scoped but incomplete if “no WARP = 77” is the convention; track the follow-up.

Synthetic/source review only; no game files. AI-assisted (OpenCode).

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.

2 participants