runtime: stop the configure when Vulkan headers are too old for the Windows runtime #269

Closed
Andretuta wants to merge 1 commit from upstream-pr/269 into main
Andretuta commented 2026-11-24 02:56:24 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by Andretuta on 2026-11-24T02:56:24Z.


Carried over from old PR 9998 by CourtyardGames in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch old-pr/9998, exactly that PR's last commit. All carried-over PRs are listed in #17.
Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it.
CourtyardGames: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one.


Original description (mentions and #N references are disabled; the numbers refer to the old repository):

Resubmission of #7729, which was closed unmerged in the 22:42 migration sweep (ItsNotRexed). Unchanged: the branch merges cleanly onto main 7e39a81ea, which still has no Vulkan header version check. #7729 had two independent passes (lucas-tafuri, airp1ane) and no change requests.

Claimed in the coordination issue as: new BUILD item, claim

What and why

runtime/CMakeLists.txt accepted any vulkan/vulkan.h, so headers that are too old configured fine and then failed deep in the build. With conda-forge's vulkan-headers (it resolves to 1.3.231 next to llvm-tools, which docs/testing.md suggests for llvm-mc) the Windows build stops at d3d12_com.h(42): error C3646: 'calibrated': unknown override specifier (no PFN_vkGetCalibratedTimestampsKHR) with 100+ errors in d3d12_vulkan_device.cpp. With SDK 1.3.280.0 it gets to vk_harness.cpp(456): VkPhysicalDevicePipelineBinaryFeaturesKHR undeclared.

  • runtime/cmake/vulkan_headers_version.cmake reads VK_HEADER_VERSION from the headers Vulkan::Headers points at (FetchContent's $<BUILD_INTERFACE:...> is unwrapped) and stops the configure with the found and needed versions, and how to fix it (newer VULKAN_SDK + delete CMakeCache.txt, or LEONIDA_VULKAN_HEADERS_FETCH=ON).
  • Only Windows-runtime configures (WIN32 AND LEONIDA_BUILD_WINDOWS_RUNTIME, which includes the xwin cross-build) check, so the portable Linux/macOS tool builds keep accepting distribution headers as before.
  • The minimum, 294, is measured, not guessed: the whole Windows runtime (555 targets, ninja -k 0) built against Khronos Vulkan-Headers tags with MSVC 14.51:
Headers Result
1.3.231 (conda-forge) stops in the D3D12 layer (d3d12_com.h, d3d12_vulkan_device.cpp)
SDK 1.3.280.0 554/555: only vk_harness (VK_KHR_pipeline_binary)
v1.3.294 (first tag with VK_KHR_pipeline_binary) 555/555
SDK 1.4.304.0 555/555
1.4.369 (current) 555/555

If #3869 (vk_harness without VK_KHR_pipeline_binary) lands, the minimum can drop: everything else already builds at 1.3.280.

  • A known-problems row in docs/testing.md.

Not the same as #7142 (missing headers in the Linux xwin preflight); no overlapping files.

Tested

Windows 11, MSVC 14.51 (VS Build Tools), CMake 4.3.1-msvc1, commit 9ce9a7923:

  • python -I tests/test_cmake_vulkan_headers_version.py: 8 tests OK (stub headers at 231, min-1, min, $<BUILD_INTERFACE:>, no version line; FetchContent and CI pins >= min; CMakeLists wiring).
  • tests/test_cmake_vulkan_missing.py, tests/test_build_runtime_cmake.py, tests/test_docs_design_rows.py: OK. python -m compileall -q make_game.py tools tests: OK. scripts/check_no_game_data.py on the new files: OK.
  • tests/test_text_write_line_endings.py fails on main too, in files this PR doesn't touch (tools/leonida_tui.py:753, tools/wave_diff.py:373).
  • Real configures: conda 1.3.231 headers -> configure error with the message; Khronos 1.4.369 -> configures; -DLEONIDA_VULKAN_HEADERS_FETCH=ON with no headers -> configures (and with the minimum temporarily raised to 999 it reports "has VK_HEADER_VERSION 363", so the FetchContent path is really checked); v1.3.294 configures and builds all 555 targets, v1.3.293 is refused.
  • No GPU code changed. The runtime built from this tree ran run_gpu_tests.py on an AMD Raphael iGPU (Ryzen 5 7600X, AMD 32.0.21042.62): 217/240, 0 failed (#166 entry).

AI-assisted: yes

Checklist

  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (n/a: no translator change)

🤖 Generated with Claude Code

<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5465214963 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/269). Originally posted by [Andretuta](https://github.com/Andretuta) on 2026-11-24T02:56:24Z. --- > Carried over from **old PR 9998** by `CourtyardGames` in the original Leonida repository, which went private on 23 Nov 2026. The code is the branch `old-pr/9998`, exactly that PR's last commit. All carried-over PRs are listed in #17. > Opened as a draft, and the CI runs the opening started were cancelled so 250 PRs don't fill the queue. Re-run CI here when you review it. > `CourtyardGames`: this is your work. Feel free to take it over, by pushing to the branch or opening your own PR and closing this one. --- Original description (mentions and `#N` references are disabled; the numbers refer to the old repository): Resubmission of `#7729`, which was closed unmerged in the 22:42 migration sweep (ItsNotRexed). Unchanged: the branch merges cleanly onto `main` `7e39a81ea`, which still has no Vulkan header version check. `#7729` had two independent passes (lucas-tafuri, airp1ane) and no change requests. Claimed in the coordination issue as: new BUILD item, [claim](https://github.com/ItsNotRexed/Leonida/issues/7496#issuecomment-7108244517) ### What and why `runtime/CMakeLists.txt` accepted any `vulkan/vulkan.h`, so headers that are too old configured fine and then failed deep in the build. With conda-forge's `vulkan-headers` (it resolves to 1.3.231 next to `llvm-tools`, which `docs/testing.md` suggests for `llvm-mc`) the Windows build stops at `d3d12_com.h(42): error C3646: 'calibrated': unknown override specifier` (no `PFN_vkGetCalibratedTimestampsKHR`) with 100+ errors in `d3d12_vulkan_device.cpp`. With SDK 1.3.280.0 it gets to `vk_harness.cpp(456)`: `VkPhysicalDevicePipelineBinaryFeaturesKHR` undeclared. - `runtime/cmake/vulkan_headers_version.cmake` reads `VK_HEADER_VERSION` from the headers `Vulkan::Headers` points at (FetchContent's `$<BUILD_INTERFACE:...>` is unwrapped) and stops the configure with the found and needed versions, and how to fix it (newer `VULKAN_SDK` + delete `CMakeCache.txt`, or `LEONIDA_VULKAN_HEADERS_FETCH=ON`). - Only Windows-runtime configures (`WIN32 AND LEONIDA_BUILD_WINDOWS_RUNTIME`, which includes the xwin cross-build) check, so the portable Linux/macOS tool builds keep accepting distribution headers as before. - The minimum, **294**, is measured, not guessed: the whole Windows runtime (555 targets, `ninja -k 0`) built against Khronos Vulkan-Headers tags with MSVC 14.51: | Headers | Result | |---|---| | 1.3.231 (conda-forge) | stops in the D3D12 layer (`d3d12_com.h`, `d3d12_vulkan_device.cpp`) | | SDK 1.3.280.0 | 554/555: only `vk_harness` (`VK_KHR_pipeline_binary`) | | v1.3.294 (first tag with `VK_KHR_pipeline_binary`) | 555/555 | | SDK 1.4.304.0 | 555/555 | | 1.4.369 (current) | 555/555 | If `#3869` (vk_harness without `VK_KHR_pipeline_binary`) lands, the minimum can drop: everything else already builds at 1.3.280. - A known-problems row in `docs/testing.md`. Not the same as `#7142` (missing headers in the Linux xwin preflight); no overlapping files. ### Tested Windows 11, MSVC 14.51 (VS Build Tools), CMake 4.3.1-msvc1, commit 9ce9a7923: - `python -I tests/test_cmake_vulkan_headers_version.py`: 8 tests OK (stub headers at 231, min-1, min, `$<BUILD_INTERFACE:>`, no version line; FetchContent and CI pins >= min; CMakeLists wiring). - `tests/test_cmake_vulkan_missing.py`, `tests/test_build_runtime_cmake.py`, `tests/test_docs_design_rows.py`: OK. `python -m compileall -q make_game.py tools tests`: OK. `scripts/check_no_game_data.py` on the new files: OK. - `tests/test_text_write_line_endings.py` fails on `main` too, in files this PR doesn't touch (`tools/leonida_tui.py:753`, `tools/wave_diff.py:373`). - Real configures: conda 1.3.231 headers -> configure error with the message; Khronos 1.4.369 -> configures; `-DLEONIDA_VULKAN_HEADERS_FETCH=ON` with no headers -> configures (and with the minimum temporarily raised to 999 it reports "has VK_HEADER_VERSION 363", so the FetchContent path is really checked); v1.3.294 configures and builds all 555 targets, v1.3.293 is refused. - No GPU code changed. The runtime built from this tree ran `run_gpu_tests.py` on an AMD Raphael iGPU (Ryzen 5 7600X, AMD 32.0.21042.62): 217/240, 0 failed ([`#166` entry](https://github.com/ItsNotRexed/Leonida/issues/166#issuecomment-7108320796)). AI-assisted: yes ### Checklist - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (n/a: no translator change) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
MoonEyes commented 2026-11-27 19:43:05 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-27T19:43:05Z.


Thanks a lot for carrying this over, @Andretuta. The same change is open in #1824, rebased on current main with the commit by CourtyardGames (old PR 9998) kept: the four files (runtime/CMakeLists.txt, runtime/cmake/vulkan_headers_version.cmake, docs/testing.md and the test) change in the same way, line for line.

I am closing this draft to keep the queue clear. Please continue the discussion in #1824, or reopen this one if something is missing there.

AI-assisted (Claude Code, Claude Opus 5.5)

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7226802224 --> Imported from [ubiquitarianism/leonida](https://github.com/ProjectLeonida/mandy/pull/269#issuecomment-7226802224). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-27T19:43:05Z. --- Thanks a lot for carrying this over, @Andretuta. The same change is open in #1824, rebased on current `main` with the commit by `CourtyardGames` (old PR 9998) kept: the four files (`runtime/CMakeLists.txt`, `runtime/cmake/vulkan_headers_version.cmake`, `docs/testing.md` and the test) change in the same way, line for line. I am closing this draft to keep the queue clear. Please continue the discussion in #1824, or reopen this one if something is missing there. AI-assisted (Claude Code, Claude Opus 5.5)

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!269
No description provided.