Skip to content

Tests: fail CTest when requested Vulkan validation cannot initialize (TEST-103) - #757

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
VictorJulianiR:codex/classify-vulkan-test-setup
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
VictorJulianiR:codex/classify-vulkan-test-setup

Conversation

@VictorJulianiR

@VictorJulianiR VictorJulianiR commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

TEST-103, claimed on #634. Follow-up to TEST-89 (#657). The Windows reproduction and @matheuskshn's independent review identified a false skip in the registered CTest.

vktest::Device::initialize() distinguishes a ready device, an unavailable device and a setup failure. Existing test callers can keep using create() for a boolean result. The registered device test now returns 77 only for an unavailable loader, an incompatible driver, or a selected device that cannot meet the existing requirements. A missing explicitly requested layer or a Vulkan initialization error exits 1. Layer and physical-device enumeration retry VK_INCOMPLETE.

I ran the real executable and its registered CTest on GitHub-hosted Windows Server 2022 with MSVC and Mesa llvmpipe. An independent Vulkan probe checked adapter and layer availability for each case.

Condition Main This change
No registered Vulkan driver Executable 77, CTest skipped Executable 77, CTest skipped
Working llvmpipe, explicitly requested validation missing Executable 77, CTest skipped and exited 0 Executable 1, CTest failed and exited 8
Working llvmpipe, validation unset Device initialized and reached the existing resolve assertion Same result

With the validation layer installed and enabled, the existing descriptor test passed its shader readbacks. The full device test initialized successfully and still reached the existing resolve assertion on this runner's host command list. Separate enumeration controls exercised zero entries, a growing list requiring a retry, a smaller final count and a hard error. Parent · Candidate · Installed layer and enumeration controls.

Supplemental check with #717

On GitHub-hosted Windows Server 2022, I merged the tested heads of #757 (0592ad83) and #717 (2e23f954) in the runner. #717 handles the host command list that blocked the standalone tests above. On this combined tree, the full device executable exited 0 with validation unset. With the Khronos validation layer installed and enabled, the executable exited 0 and its registered CTest reported Passed. The host lacks ID3D12GraphicsCommandList7. The resolve comparison matched all 10 supported cases, skipped 45 unsupported or host-unavailable cases, and reported zero mismatches. Full device test and registered CTest.

The independent probe still found llvmpipe when the requested layer was missing. The combined executable exited 1 and CTest reported Failed (exit 8). With no registered driver, the executable exited 77 and CTest reported Skipped (exit 0). Probe and negative controls.

AI-assisted. Synthetic tests on software Vulkan, no game files.

@VictorJulianiR VictorJulianiR changed the title Tests: fail CTest when requested Vulkan validation cannot initialize Tests: fail CTest when requested Vulkan validation cannot initialize (TEST-103) Nov 22, 2026
@troythedecoyx

Copy link
Copy Markdown
Contributor

Tested 0592ad8 merged onto main 67204bf (no conflicts) on Windows 11 Home, NVIDIA GeForce RTX 4060 Ti, driver 621.24 (32.0.16.2124), Vulkan SDK 1.4.363, MSVC (VS 2022), RelWithDebInfo + Ninja.

  • ctest: 29/29 passed, same as main; d3d12_vulkan_device_test still finds the GPU and runs (not skipped).
  • Run without LEONIDA_VK_VALIDATION, so the new "validation cannot initialize" failure path was not exercised here.

AI-assisted (Claude Code).

@ismailchaka1

Copy link
Copy Markdown
Contributor

Tested 0592ad8 on an NVIDIA GeForce RTX 4070 SUPER, driver 32.0.16.1088, Windows 11, MSVC 2022 (Ninja, RelWithDebInfo), LEONIDA_VK_VALIDATION=1: pass.

PR head as-is, no game files. AI-assisted.

@ItsNotRexed
ItsNotRexed merged commit 94c7864 into ItsNotRexed:main Nov 22, 2026
8 of 9 checks passed
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.

4 participants