Repository navigation
runtime tests: skip, not fail, without a Vulkan driver or a working host GameInput (4 ctests) - #7452
comtek21516 wants to merge 2 commits into
Conversation
…driver, or a GameInput that cannot start On a machine with the Vulkan loader and no ICD (Windows Server 2025, Microsoft Basic Display Adapter) four tests failed where the other layer and Vulkan tests skip: - vk_bindless_ps_tex and vk_bindless_ps_imgatomic: vk_bindless_test reported vkCreateInstance's VK_ERROR_INCOMPATIBLE_DRIVER as a failure. It now exits 77 for that result, as vk_texture_test and d3d12_indirect_rt_test do; any other instance error still fails. - d3d12_sparse_queue_family: a device that cannot be created threw out of ok() and ended as LAYER_FATAL. It now exits 77, as the other create_vulkan_device_standalone tests do; check_sparse_queue_family.py already reads 77 as "device unavailable". - gameinput_host: GameInput.dll loads there, but GameInputCreate returns 0xD0000034 to every caller. The test now asks the host's copy itself before anything is mapped and skips only when that call fails, so a create that fails only from mapped code is still a failure. ctest on that machine: 265 of 269 passed before, 269 of 269 after (144 passed, 125 skipped). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
SirKingg
left a comment
There was a problem hiding this comment.
Independent Windows review of b6fd4f7: one blocking issue below; no approval yet.
Windows, NVIDIA GeForce RTX 4070 Ti, NVIDIA driver 610.88, MSVC 19.44, Ninja RelWithDebInfo, Vulkan SDK 1.4.363. With no game data: gameinput_host, d3d12_sparse_queue_family and d3d12_sparse_queue_family_contract passed, including all three sparse queue cases and the API-dump/validation contract. GameInput reported no attached gamepad. With process-only VK_DRIVER_FILES pointing to a nonexistent manifest, the two sparse CTests skipped and vk_bindless_test.exe dummy-vs dummy-ps returned 77 before opening its shader arguments. With process-only LEONIDA_VK_VALIDATION=1 and VK_LOADER_LAYERS_DISABLE=VK_LAYER_KHRONOS_validation, sparse CTest skipped despite the GPU being usable; its contract CTest also skipped when the validation layer was disabled. A nonexistent LEONIDA_VK_DEVICE filter likewise led to a skip.
Limits: LLVM llvm-mc was unavailable, so the two bindless shader CTests were not registered and their GPU success paths were not tested. No native absent-GameInput host or attached gamepad was tested; the host GameInput create/release followed by mapped create succeeded on this machine. Only process environments were changed; no driver or service was disabled. AI-assisted review and testing.
| ok(rt::d3d12::create_vulkan_device_standalone(IID_PPV_ARGS(&device)), | ||
| "Leonida create_vulkan_device_standalone"); | ||
| const HRESULT created = rt::d3d12::create_vulkan_device_standalone(IID_PPV_ARGS(&device)); | ||
| if (FAILED(created) || !device) { |
There was a problem hiding this comment.
Could we distinguish a genuinely unavailable Vulkan device from failures in the layer under test before returning 77? create_vulkan_device_standalone collapses many failures to E_FAIL, including vkCreateDevice and Device::ok() failures, so this turns regressions into skips. On a working RTX 4070 Ti I reproduced this without changing system configuration: set LEONIDA_VK_VALIDATION=1 and VK_LOADER_LAYERS_DISABLE=VK_LAYER_KHRONOS_validation only for the test process. The runtime reports the requested validation layer is not listed, but this branch reports SKIP: no Vulkan device and CTest succeeds as skipped. d3d12_sparse_queue_family_contract also skips with that layer disabled, despite requiring its validation run. A separate host capability probe or a distinguishable unavailable result would preserve failures from device initialization.
|
Tested on RTX 5090, 621.24, Windows 11: pass, both sides of the change.
So the skip path is real: a machine without a Vulkan driver now reports Skipped instead of a red suite. |
…ce, not on every failed device creation Review of ItsNotRexed#7452: create_vulkan_device_standalone answers E_FAIL for a machine without Vulkan and for a device the layer failed to set up alike, so skipping on any failure turned LEONIDA_VK_VALIDATION=1 without the validation layer (and a regression in device setup) into a skip, and check_sparse_queue_family.py with it. When the layer's device cannot be created the test now asks the host through vktest::Device, the helper the other tests use to tell "unavailable" from "failed". Only "unavailable" (no loader, no ICD, no usable device) is a skip; anything else is the failure it was before. The probe runs on the failure path alone, so the API dump of a passing run is unchanged. On a machine with the loader and no ICD: plain run exits 77; LEONIDA_VK_VALIDATION=1 with VK_LOADER_LAYERS_DISABLE=VK_LAYER_KHRONOS_validation exits 2 with LAYER_FATAL, as on main. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YHQeDAbEKR4jpz9KAg4Jt7
|
@SirKingg thanks, that was right: skipping on every failed device creation hid exactly the case you ran. Changed in When On the machine without a driver (Windows Server 2025, MSVC 14.52, RelWithDebInfo):
Not run here, because there is no GPU: a AI-assisted (Claude Code). |
|
Tested
Not tested: Windows Server or a remote session (the AI-assisted (Claude Code). |
|
No-GPU CI check of I ran the Runtime workflow (
What this run doesn't cover:
No game files. AI-assisted (Claude Code). |
|
A Linux run of
AI-assisted (Claude Code). |
Claimed in the coordination issue as: new item
Depends on: nothing. It conflicts with #4362 in the header comment of
runtime/test/gameinput_host_test.cpponly (both reword the "Skips (exit 77) only where..." sentence; the code hunks are apart). It touchesruntime/test/d3d12_sparse_queue_family_test.cppnext to #4841, on other lines.What and why
On a machine that has the Vulkan loader but no driver, four ctests fail where the other GPU tests skip. Each now exits 77 for that case, the way its sibling tests already do:
vk_bindless_ps_tex,vk_bindless_ps_imgatomic(vk_bindless_test.cpp):vkCreateInstancereturningVK_ERROR_INCOMPATIBLE_DRIVERwent throughCHECKand ended the test withFAILED ... -> -9. It is now a skip, as invk_texture_test.cppandd3d12_indirect_rt_test.cpp. Any other instance error still fails.d3d12_sparse_queue_family: a device thatcreate_vulkan_device_standalonecannot create threw out ofok()and ended asLAYER_FATAL(exit 2). The test now asks the host throughvktest::Devicewhen that happens and exits 77 only if the host reports no Vulkan device (unavailable: no loader, no ICD, no usable device). A host where Vulkan works,LEONIDA_VK_VALIDATIONwithout the layer, or aLEONIDA_VK_DEVICEthat matches nothing is still the failure it was (changed in19fdb6fe9after review).check_sparse_queue_family.pyalready reads 77 from this program as "device unavailable".gameinput_host: on Windows Server 2025GameInput.dllloads (0.2309.26100,GameInputSvcrunning), butGameInputCreatereturns0xD0000034, to the test's own call and to mapped code alike. The test kept its rule of deciding a skip from the machine and not from the loader's answer: it now calls the host'sGameInputCreateitself, before anything is mapped, and skips only when that call fails. A create that fails only from mapped code is still a failure.Two comments in
runtime/CMakeLists.txtand one sentence indocs/gameinput.mdsay the same.Tested
Windows Server 2025, Microsoft Basic Display Adapter only: no GPU and no Vulkan driver, which is the case under test (
vulkaninfofails,vkCreateInstancereturnsVK_ERROR_INCOMPATIBLE_DRIVER). MSVC 14.52 (Visual Studio 18), Windows SDK 10.0.26100, Ninja, RelWithDebInfo.mainatcc6778089:ctest265 of 269 passed;gameinput_host,d3d12_sparse_queue_family,vk_bindless_ps_texandvk_bindless_ps_imgatomicfailed.86a7807dd, full rebuild (also at19fdb6fe9):ctest270 of 270, 145 passed and 125 skipped; the four skip with the messages above, andd3d12_sparse_queue_family_contractskips as before.d3d12_sparse_queue_family_testwithLEONIDA_VK_VALIDATION=1andVK_LOADER_LAYERS_DISABLE=VK_LAYER_KHRONOS_validation:LAYER_FATAL, exit 2, as onmain.Not tested: a machine with a GPU or a working GameInput. There the first two changes are not reached (they act only on
VK_ERROR_INCOMPATIBLE_DRIVERand on a failed device creation), andgameinput_hostmakes one moreGameInputCreate/Releasein the test process before the mapped call. A run ofctest -R "gameinput_host|vk_bindless_ps|d3d12_sparse_queue_family"on such a machine would confirm that nothing changes there.AI-assisted: yes (Claude Code)
Checklist
docs/design.md, with how it was confirmed. (Not applicable: no translator change.)🤖 Generated with Claude Code