Skip to content

d3d12_predicated_copy: no Vulkan device returns 77, so ctest skips instead of failing every run - #1314

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
bobcatchris:fix/predicated-copy-skip
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
bobcatchris:fix/predicated-copy-skip

Conversation

@bobcatchris

Copy link
Copy Markdown
Contributor

main has been red since c0ac5fd6: runtime.yml run 45009525483 fails the windows job with 49/67 Test #49: d3d12_predicated_copy ***Failed 0.14 sec (the run on e7584c52 before it passed). It also fails on #1290's windows job, whose head touches only tools/mesh_compute_vs.py + its test, so it is inherited from main.

Cause. c0ac5fd6 registers the test with SKIP_RETURN_CODE 77, and its message says "exit 77 is a skip", but runtime/test/d3d12_predicated_copy_test.cpp never returns 77:

    if(!native_only) {
        if(!vk.create())return 1;      // no Vulkan ICD -> exit 1 -> ctest Failed

The CI Windows runner has no Vulkan device, so the test exits 1 and takes the whole CPU runtime job with it.

Fix. That one line becomes return 77;, which is the convention the other registered runtime tests already use:

  • runtime/test/d3d12_copy_xfmt_test.cpp:171 — if (!vk.create()) return 77;
  • runtime/test/d3d12_com_test.cpp:37 — if (device_status == vktest::DeviceStatus::unavailable) return 77; // no Vulkan GPU: ctest skips
  • d3d12_clear_test.cpp, d3d12_debug_markers_test.cpp, d3d12_depth_resolve_test.cpp, d3d12_descriptor_test.cpp, d3d12_fence_events_test.cpp, d3d12_fence_timing_test.cpp all return 77 too.

Nothing else changes: the --warp-only path never reaches vk.create(), and the "requires conditional rendering and storageBuffer8BitAccess" path is untouched.

Verification. I cannot build MSVC or run a Windows GPU job here, so this PR's windows job is the check: with the change, test 49 should report Skipped and CPU runtime tests should pass. On a machine with a Vulkan device the test still runs as before (the RTX 4060 Ti result in c0ac5fd6 is unaffected).

No game data, no keys. AI-assisted.

c0ac5fd registered the test with SKIP_RETURN_CODE 77, but the test never
returns 77: a machine without a Vulkan ICD (the Windows CI runner) failed
vk.create() and returned 1, so the whole CPU runtime job went red on main.
Return 77 there like d3d12_copy_xfmt_test and the other registered tests.

@whattheflop whattheflop 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.

AI-assisted independent Windows verification of 675e35b2d41e602b1fb3d167cbddfe98e0256982 and its direct parent c0ac5fd6518b3ba9fa66765b8b07099990dadd74. I built the stock d3d12_predicated_copy_test target with CMake/Ninja and MSVC 19.38. No game files were used.

Environment Parent raw exit / CTest PR head raw exit / CTest
RTX 3080 (616.64), Khronos validation enabled, compared with WARP 0 / Passed (0) 0 / Passed (0)
No ICD via a process-local VK_LOADER_DRIVERS_SELECT filter matching no manifest 1 / Failed (8) 77 / Skipped (0)
Normal ICD discovery, validation requested, VK_LAYER_PATH set to an empty directory for the process 1 / Failed (8) 77 / Skipped (0)

Both validated runs completed 180 exact buffer-copy cases and 16 query-to-copy cases with 4 recapture controls and zero validation errors. On both revisions, --warp-only under the no-ICD filter exited 0 with the same counts. With the layer hidden and validation off, both revisions still selected the RTX 3080 and passed. Turning validation on in that environment printed the missing-layer diagnostic on both revisions, but the PR head classified the setup error as a skip.

The no-ICD result confirms the intended fix. Please use vk.initialize() at the changed call site so DeviceStatus::unavailable returns 77, DeviceStatus::failed returns 1, and DeviceStatus::ready continues. The boolean create() collapses both non-ready statuses, including the demonstrated validation setup failure. #1266 uses this distinction. #1258 is precedent for returning 77 on specific unavailable paths and checking those skip paths.

@kapitche

Copy link
Copy Markdown
Contributor

Tested on Windows 11 with two GPUs on one machine (runtime built from this PR's head, MSVC 14.51): pass. ctest: 65/65 on the RTX 4080 SUPER, with d3d12_predicated_copy passing. On the Intel UHD 770 it passes too, and the 4 Intel failures are the known ones (vk_binary_occlusion reported in #1218, d3d12_vulkan_device #962 / #1285, d3d12_descriptor min-LOD, d3d12_copy_xfmt). Both machines have a Vulkan device, so the new exit-77 skip path doesn't run here.

@Ryderadzeee

Copy link
Copy Markdown
Contributor

Independent Windows verification of 675e35b2 and its parent c0ac5fd6 (Windows 11 26300.10075, MSVC 19.51.36256). On the PR head, both Radeon GPUs completed 180 exact buffer copies and 16 query-to-copy cases, including the 4 recapture controls. RX 9070 XT driver 32.0.32029.2010, integrated Radeon driver 32.0.21045.29003.

I also tested a different setup error from the missing-layer case above. With a working ICD and a process-local LEONIDA_VK_DEVICE that matches no adapter, the PR executable prints the no-match diagnostic and exits 77. I built a local copy with the suggested vk.initialize() status check and verified both paths:

Condition Stock result Local status check
No ICD (VK_DRIVER_FILES points to a nonexistent manifest) Parent exit 1 / CTest Failed, PR exit 77 / CTest Skipped Exit 77 / CTest Skipped
GPU filter matches no adapter PR exit 77 Exit 1 / CTest Failed
RX 9070 XT selected PR exit 0 Exit 0, all cases passed

With the ICD hidden, --warp-only on the PR head also passed. Synthetic fixtures only, Vulkan validation layers disabled. AI-assisted testing.

@ItsNotRexed
ItsNotRexed merged commit e6e8809 into ItsNotRexed:main Nov 22, 2026
11 checks passed
@undeadhuman37

Copy link
Copy Markdown
Contributor

Tested 675e35b on NVIDIA GeForce RTX 4070 SUPER, driver 621.01, Windows 11 Home 25H2 (26200.9974), VS 2022 Build Tools, Vulkan SDK 1.4.363.1: pass.

  • Build: 0 warnings. ctest: 66/66 passed.
  • d3d12_predicated_copy_test: 180 exact cases (Vulkan + WARP + literal byte oracle), exit 0, also with LEONIDA_VK_VALIDATION=1 and 0 validation errors. This machine has a Vulkan device, so the new exit-77 path was not exercised here.

AI-assisted. No game files.

ItsNotRexed pushed a commit that referenced this pull request Nov 22, 2026
main's tests/test_ctest_registration.py (#1258) fails on this branch after
the merge: d3d12_compute_test, d3d12_draw_test and d3d12_present_test are
built but no add_test runs them.

They are registered like their neighbours, with SKIP_RETURN_CODE 77, and
return 77 when vktest::Device::initialize() finds no Vulkan device, as the
other registered D3D12 tests do. Without that, the CPU runtime job, whose
runner has no Vulkan driver, would fail on them the way it did on
d3d12_predicated_copy before #1314.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
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.

6 participants