Skip to content

d3d12_msaa_draw, d3d12_translated_draw: skip with 77 when there is no Vulkan device (TEST-652) - #3301

Merged
ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
TheHoracio:msaa-test-skip
Nov 22, 2026
Merged

ItsNotRexed merged 1 commit into
ItsNotRexed:mainfrom
TheHoracio:msaa-test-skip

Conversation

@TheHoracio

Copy link
Copy Markdown
Contributor

TEST-652, claimed in #3232: #3232 (comment) (found by @Vonsek).

What and why

runtime/test/d3d12_msaa_draw_test.cpp:49 did EXPECT(d.create()). With no Vulkan driver, that is a failure, not a skip. The hosted Windows CI runner has no GPU, so this was the one red test in every Windows run, on main and on unrelated PRs. I wrote that test in #831, and the sibling tests already handle this.

The fix: d3d12_msaa_draw_test and d3d12_translated_draw_test, which has the same line, now take vktest::Device::initialize().

  • On DeviceStatus::unavailable they return 77, their registered SKIP_RETURN_CODE, as d3d12_clear_test.cpp:288-289 and the rest do.
  • unavailable means no Vulkan loader, VK_ERROR_INCOMPATIBLE_DRIVER, or no usable device.
  • A device that exists but fails to come up is still a failure.

d3d12_translated_draw builds only with llvm-mc, which the hosted runner doesn't have, so it never showed up in CI. It had the same latent failure on a machine with llvm-mc and no GPU.

Why the runner has no device: a hosted runner has no Vulkan ICD. vkCreateInstance then returns VK_ERROR_INCOMPATIBLE_DRIVER, which initialize() reports as unavailable. I reproduced that locally instead of from the CI log.

Tested

Windows 11 Pro 26300, MSVC 19.4x, Vulkan SDK 1.4.363.0, RX 7800 XT and Radeon iGPU (AMD 26.10.1).

main this PR
VK_LOADER_DRIVERS_SELECT='*nonexistent*' d3d12_msaa_draw_test (no driver) exit 1, line 49: d.create() exit 77; ctest: Skipped
the same for d3d12_translated_draw_test (built with llvm-mc) — exit 77
with the GPU, LEONIDA_VK_VALIDATION=1 pass pass, both: 4096 MSAA pixels matched; ctest -R 2/2

AI-assisted (Claude Code).

🤖 Generated with Claude Code

… Vulkan device (TEST-652)

Both did EXPECT(d.create()), which turns "no Vulkan driver" into a failure. The hosted Windows CI runner has no
GPU, so d3d12_msaa_draw was the one red test on every Windows run. They now take vktest::Device::initialize()
and return 77 (their SKIP_RETURN_CODE) on DeviceStatus::unavailable, like d3d12_clear_test and the rest; a device
that exists but fails to come up is still a failure.

Reproduced locally with VK_LOADER_DRIVERS_SELECT matching no driver: d3d12_msaa_draw exited 1 ("line 49:
d.create()") on main and exits 77 now (ctest: Skipped); d3d12_translated_draw likewise. With the GPU both still
pass under LEONIDA_VK_VALIDATION=1. d3d12_translated_draw only builds with llvm-mc, which the hosted runner
lacks, so it never showed there.

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

Copy link
Copy Markdown
Contributor

Code read and MSVC syntax check on Windows 11 Pro (MSVC 19.44, C++20): pass.

Both d3d12_msaa_draw_test.cpp and d3d12_translated_draw_test.cpp correctly switch to d.initialize() and return exit code 77 on DeviceStatus::unavailable, matching SKIP_RETURN_CODE 77 in runtime/CMakeLists.txt and aligning with the other milestone tests.

Closed duplicate #3308 in deference to this PR.

No game files used. AI-assisted.

@0xTehuti 0xTehuti 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.

Hardware Certification Review — NVIDIA GeForce RTX 2070 SUPER (Turing TU104)

Tested and verified on physical hardware on Windows 11 x64:

  • GPU: NVIDIA GeForce RTX 2070 SUPER (8192 MB VRAM, Turing TU104)
  • Driver: NVIDIA 595.79.0.0 (Vulkan 1.4.329)
  • Toolchain: MSVC 19.44.35225 x64 + CMake 4.4 + Ninja 1.13 + Python 3.13
  • OS: Windows 11 Pro x64 (Build 26100)

Empirical Test Results

  1. Native execution on physical GPU:

    • Subgroup sizes: 32..32 (default 32, requirable in stages 0x3fff, subgroupSizeControl ON, computeFullSubgroups ON)
    • d3d12_msaa_draw_test.exe passed: 4x draws resolved, 4096 pixels matched; 64 of 189 edge pixels are partial (red/blue mix); SampleMask 0x1 wrote one sample of four; 3 samples and a mismatched target refused.
    • ctest --test-dir runtime/build -R d3d12_msaa_draw: Passed (0.26s, exit code 0).
  2. Simulated headless / hosted CI runner (\VK_LOADER_DRIVERS_SELECT=nonexistent):

    • Direct execution returned 77.
    • ctest --test-dir runtime/build -R d3d12_msaa_draw: Skipped (0.03s, 100% tests passed).

LGTM. Fixes the red CI check on hosted Windows runners cleanly while preserving full functionality on real hardware.

@al3xar

al3xar commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Tested 3a276c29 on NVIDIA GeForce RTX 3060 (driver 621.24, Vulkan 1.4.357, Windows 11, MSVC 19.44, Vulkan SDK 1.4.363.0): pass.

  • d3d12_msaa_draw_test.exe with LEONIDA_VK_VALIDATION=1: exit 0, 0 validation errors (4,096 pixels matched).
  • d3d12_translated_draw_test.exe with LEONIDA_VK_VALIDATION=1: exit 0, 0 validation errors (4,064/4,096 exact, 32 diagonal edge pixels clear).
  • ctest -R "^(d3d12_msaa_draw|d3d12_translated_draw)$" --output-on-failure: 2/2 Passed.
  • Code diff matches the d.initialize() / DeviceStatus::unavailable -> 77 / DeviceStatus::ready pattern used across the rest of the d3d12_* tests.

AI-assisted.

@CowBoYdu76

Copy link
Copy Markdown
Contributor

Tested 3a276c2 merged onto main f847748 (clean merge) on Windows 11 build 26300, MSVC 19.44, Ninja RelWithDebInfo, Vulkan SDK 1.4.363.0, with two GPUs: RTX 4070 SUPER (NVIDIA 616.64) and Intel UHD 770 (101.7092), picked with LEONIDA_VK_DEVICE: pass, including the no-driver case itself, run locally with VK_LOADER_DRIVERS_DISABLE=*.

main f847748, no driver this PR, no driver this PR, 4070 SUPER this PR, UHD 770
d3d12_msaa_draw_test exit 1, line 50: d.create() exit 77 exit 0, 4096 pixels matched exit 0, 4096 pixels matched
d3d12_translated_draw_test exit 1, line 86: d.create() exit 77 exit 0, 4064/4096 exact exit 0, 4064/4096 exact
ctest -R "^(d3d12_msaa_draw|d3d12_translated_draw)$" 2 Skipped 2/2 passed

With a GPU, both tests give 0 messages under VK_LAYER_KHRONOS_validation on both GPUs. The UHD 770 adds an Intel data point to the NVIDIA run above.

AI-assisted (Claude Code). No game files.

@kacper-serewis kacper-serewis 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.

At 3a276c2 both native Windows MSVC Release binaries returned 77 when the synthetic loader supplied VK_ERROR_INCOMPATIBLE_DRIVER, with CTest marking both skipped and returning 0. VK_ERROR_INITIALIZATION_FAILED made both return 1, report VkResult -3 and fail CTest (exit 8). No GPU needed for this control. AI-assisted.

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

Note

🤖 Gemini 4 Neon responding on behalf of Jolymmiles

Static code review of 3a276c29 against main (f847748c) (macOS host, no Windows/Vulkan execution rerun here): looks good.

  • Both runtime/test/d3d12_msaa_draw_test.cpp and runtime/test/d3d12_translated_draw_test.cpp replace EXPECT(d.create()) with d.initialize(), returning 77 only on vktest::DeviceStatus::unavailable (matching SKIP_RETURN_CODE 77 in runtime/CMakeLists.txt) and preserving test failure on DeviceStatus::failed via EXPECT(device_status == vktest::DeviceStatus::ready).
  • Audited all 74 unique CTest entries with SKIP_RETURN_CODE 77 in runtime/CMakeLists.txt on f847748c: only three tests still use EXPECT(d.create()) (d3d12_msaa_draw, d3d12_translated_draw, and d3d12_geometry). This PR together with #3360 closes all three.
  • Cleanly mergeable onto f847748c, no game files.

@ItsNotRexed
ItsNotRexed merged commit 96b6bbf into ItsNotRexed:main Nov 22, 2026
2 of 4 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.

8 participants