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

Open
github-bot wants to merge 1 commit from github-bot/gh-1267 into main AGit
Owner

@⁠delysidemanYT1 on GitHub · 2026-11-24 21:03 UTC · original
delysidemanYT1:test-present-headless → main · +11 −1 · 1 files · 1 commits · open

Claimed in the coordination issue as: TEST-PRESENT-HEADLESS
Claim: #14

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.

**@⁠delysidemanYT1** on GitHub · 2026-11-24 21:03 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1267) `delysidemanYT1:test-present-headless` → `main` · +11 −1 · 1 files · 1 commits · open Claimed in the coordination issue as: TEST-PRESENT-HEADLESS Claim: https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14 ## 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.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:45:03 +00:00
Author
Owner

@⁠PierreEbele on GitHub · 2026-11-25 14:43 UTC · original

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

**@⁠PierreEbele** on GitHub · 2026-11-25 14:43 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1267#issuecomment-7165719833) 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
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1267/head:github-bot/gh-1267'
git switch 'github-bot/gh-1267'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1267'
git switch 'github-bot/gh-1267'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1267'
git switch 'github-bot/gh-1267'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1267'
git switch 'main'
git merge --squash 'github-bot/gh-1267'
git switch 'main'
git merge --ff-only 'github-bot/gh-1267'
git switch 'main'
git merge 'github-bot/gh-1267'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.