TEST-PRESENT-HEADLESS: guard the GDI colour check on headless Windows #1267

Closed
delysidemanYT1 wants to merge 1 commit from upstream-pr/1267 into main
delysidemanYT1 commented 2026-11-24 21:03:49 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by delysidemanYT1 on 2026-11-24T21:03:49Z.


Claimed in the coordination issue as: TEST-PRESENT-HEADLESS
Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7144288485

What changed

On Windows, skip the optional GDI screen-pixel assertion when Win32 successfully reports zero active display paths. Keep the Vulkan swapchain readback assertions and the existing checks on systems with an active display. This addresses the presentation-test observation in #504.

Verification

  • Passed: git diff --check and scripts/check_no_game_data.py for the changed file.
  • A Win32 API probe on Windows with two active display paths returned success and a path count of two.
  • The C++ target and the headless case were not run locally. A Windows run with no active display path and Vulkan validation enabled is still needed.

AI-assisted: yes (Codex). No game files used.

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5480298467 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1267). Originally posted by [delysidemanYT1](https://github.com/delysidemanYT1) on 2026-11-24T21:03:49Z. --- Claimed in the coordination issue as: TEST-PRESENT-HEADLESS Claim: https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7144288485 ## What changed On Windows, skip the optional GDI screen-pixel assertion when Win32 successfully reports zero active display paths. Keep the Vulkan swapchain readback assertions and the existing checks on systems with an active display. This addresses the presentation-test observation in #504. ## Verification - Passed: git diff --check and scripts/check_no_game_data.py for the changed file. - A Win32 API probe on Windows with two active display paths returned success and a path count of two. - The C++ target and the headless case were not run locally. A Windows run with no active display path and Vulkan validation enabled is still needed. AI-assisted: yes (Codex). No game files used.
PierreEbele commented 2026-11-25 14:43:38 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by PierreEbele on 2026-11-25T14:43:38Z.


Reviewed 4190891: verified by reading only — d3d12_present_test is Windows/MSVC plus a Vulkan GPU, so it cannot run on this arm64 Linux host (no compiler is available here, and the CMake if(WIN32) gate keeps the target out of Linux configure). The guard is conservative — an API failure leaves the on-screen check active, and with any active display path behaviour is identical to before — and mirrors the GetDisplayConfigBufferSizes(QDC_ONLY_ACTIVE_PATHS) idiom already in d3d12_vulkan_device.cpp:9186. All swapchain colour and capture checks are untouched; only the end-of-test GDI read gets a headless skip, removing a false failure where GDI hands back a valid black pixel on a headless desktop. Suggestion, not a blocker: docs/d3d12_vulkan.md (~line 1436) enumerates this test's no-assert screen-check skips (Wine, covered centre, non-display adapter); one sentence for the headless-Windows case would keep that list exact. AI-assisted review.

Recommendation: Merge

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7165719833 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/1267#issuecomment-7165719833). Originally posted by [PierreEbele](https://github.com/PierreEbele) on 2026-11-25T14:43:38Z. --- Reviewed 4190891: verified by reading only — `d3d12_present_test` is Windows/MSVC plus a Vulkan GPU, so it cannot run on this arm64 Linux host (no compiler is available here, and the CMake `if(WIN32)` gate keeps the target out of Linux configure). The guard is conservative — an API failure leaves the on-screen check active, and with any active display path behaviour is identical to before — and mirrors the `GetDisplayConfigBufferSizes(QDC_ONLY_ACTIVE_PATHS)` idiom already in `d3d12_vulkan_device.cpp:9186`. All swapchain colour and capture checks are untouched; only the end-of-test GDI read gets a headless skip, removing a false failure where GDI hands back a valid black pixel on a headless desktop. Suggestion, not a blocker: `docs/d3d12_vulkan.md` (~line 1436) enumerates this test's no-assert screen-check skips (Wine, covered centre, non-display adapter); one sentence for the headless-Windows case would keep that list exact. AI-assisted review. **Recommendation:** Merge
zmasi commented 2026-11-28 21:24:57 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by zmasi on 2026-11-28T21:24:57Z.


#1267 | head 4190891754 (merged cleanly with main 1bc055e6c2) | ctest --test-dir runtime/build -C RelWithDebInfo -R "^d3d12_present$" --output-on-failure (LEONIDA_VK_VALIDATION=1) + zero-active-display-paths headless control | control: forcing has_no_active_display_paths() == true skips only the end-of-test GDI desktop readback (Windows has no active display paths: on-screen colour check skipped after swapchain readback) while preserving all Vulkan swapchain present, resize, and image-capture colour assertions | green on PR+main: d3d12_present compiles cleanly on Windows/MSVC and passes on RTX 3090 across both active-display and simulated headless runs with 0 Khronos validation errors; check_no_game_data.py 0 violations | Windows 11, MSVC 19.44, RTX 3090, Vulkan SDK 1.4.363.1 | AI-assisted: yes

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246002658 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1267#issuecomment-7246002658). Originally posted by [zmasi](https://github.com/zmasi) on 2026-11-28T21:24:57Z. --- #1267 | head 4190891754a2697ce2b20b4e17a37408cf066d54 (merged cleanly with main 1bc055e6c2dedaa0de23ec79d8c4007c1dff1fb3) | `ctest --test-dir runtime/build -C RelWithDebInfo -R "^d3d12_present$" --output-on-failure` (`LEONIDA_VK_VALIDATION=1`) + zero-active-display-paths headless control | control: forcing `has_no_active_display_paths() == true` skips only the end-of-test GDI desktop readback (`Windows has no active display paths: on-screen colour check skipped after swapchain readback`) while preserving all Vulkan swapchain present, resize, and image-capture colour assertions | green on PR+main: `d3d12_present` compiles cleanly on Windows/MSVC and passes on RTX 3090 across both active-display and simulated headless runs with `0` Khronos validation errors; `check_no_game_data.py` `0` violations | Windows 11, MSVC 19.44, RTX 3090, Vulkan SDK 1.4.363.1 | AI-assisted: yes
OreoFR commented 2026-11-28 21:48:23 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-28T21:48:23Z.


Verified by OreoFR

  • Base: main c1ecf04ed + PR head 419089175; green run in a merge package of 12 PRs, no new ctest failure vs main
  • Test: ctest -R ^d3d12_present$
  • Red on main: OK
  • Green with the PR: OK
  • Verdict: NO RED (test-only PR; Windows session with a desktop, the no-display case is not exercised)
  • Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11

AI-assisted (Claude Code, Claude Opus 5.5).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7246286878 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1267#issuecomment-7246286878). Originally posted by [OreoFR](https://github.com/OreoFR) on 2026-11-28T21:48:23Z. --- **Verified by OreoFR** - Base: main `c1ecf04ed` + PR head `419089175`; green run in a merge package of 12 PRs, no new ctest failure vs main - Test: `ctest -R ^d3d12_present$` - Red on main: OK - Green with the PR: OK - Verdict: NO RED (test-only PR; Windows session with a desktop, the no-display case is not exercised) - Machine: RTX 4070 Laptop 8 GB, NVIDIA 621.40, Intel Core Ultra 7 155H, Windows 11 AI-assisted (Claude Code, Claude Opus 5.5).
aslan2142 commented 2026-12-01 16:34:33 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T16:34:33Z.


Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, d3d12/, or general docs), please feel free to reopen it.

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7317833259 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/1267#issuecomment-7317833259). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-12-01T16:34:33Z. --- Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (`d3d12/`) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools, `d3d12/`, or general docs), please feel free to reopen it.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
ProjectLeonida/mandy!1267
No description provided.