Repository navigation
Conversation
…ot a failure Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
tupacfan04
left a comment
There was a problem hiding this comment.
Two real classification defects, plus a layer-only check that is now skipped unnecessarily.
d3d12_clear_formats_testchecks validation before destroying the device.runtime/test/d3d12_clear_formats_test.cpp:342-348returns 77 inside the WARP-creation-failure block whileours,host,factoryandwarpare 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).
-
A real WARP failure is still counted as a skip.
d3d12_clear_formats_test.cpp:357-360and:384-387treat any non-okclear_color/clear_depthresult as++tally.skipped. OnlyResult::not_createdmeans WARP does not expose the format;Result::failedis also returned for command-queue, allocator, command-list, fence, execute and readback failures (:141-167,:181-209). Those are real failures and must incrementtally.failed/exit 1, not skip. (Pre-existing, but exactly the classification this PR changes.) -
d3d12_clear_testskips a host-independent check.runtime/test/d3d12_clear_test.cpp:418-427returns 77 beforecheck_unlisted_rtvs(ours.p), which uses only the layer's device and fixed expectations, nothost/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. -
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 haveSKIP_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).
Claim: #7913 (follow-up of #8022)
d3d12_clearandd3d12_clear_formatsbuild a WARP reference device for their differential comparison. When it can't be created they print "WARP reference unavailable: differential test cannot run" andreturn 1, so ctest reports a failure although nothing was compared. Both tests already declareSKIP_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):
SKIP <test>: no WARP reference device (differential test cannot run)line and return 77.d3d12_clear_formatsstill returns 1 if a Vulkan validation error was recorded before that point.d3d12_clear, the caller's validation-error check still runs first and still fails.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
maindde82f2, RTX 4090 for the layer's Vulkan device:maind3d12_cleard3d12_clear_formatsNegative control: with
main's two files rebuilt, both fail again.scripts/check_no_game_data.pyis clean. Not run on native Windows, where WARP exists and this branch isn't taken.Same pattern, not changed here. These tests also
return 1after "WARP reference unavailable" withSKIP_RETURN_CODE 77set:d3d12_texture1d_target_test.cpp:271,d3d12_typeless_rtv_test.cpp:436andd3d12_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