[PR #269] runtime: stop the configure when Vulkan headers are too old for the Windows runtime #322

Open
opened 2026-11-26 20:17:30 +01:00 by 4ld0 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ubiquitarianism/leonida/pull/269
Author: @Andretuta
Created: 11/24/2026
Status: 🔄 Open

Base: main ← Head: old-pr/9998


📝 Commits (1)

  • a2828ee runtime: stop the configure when Vulkan headers are too old for the Windows runtime

📊 Changes

4 files changed (+154 additions, -0 deletions)

View changed files

📝 docs/testing.md (+1 -0)
📝 runtime/CMakeLists.txt (+6 -0)
➕ runtime/cmake/vulkan_headers_version.cmake (+45 -0)
➕ tests/test_cmake_vulkan_headers_version.py (+102 -0)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ubiquitarianism/leonida/pull/269 **Author:** [@Andretuta](https://github.com/Andretuta) **Created:** 11/24/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `old-pr/9998` --- ### 📝 Commits (1) - [`a2828ee`](https://github.com/ubiquitarianism/leonida/commit/a2828eeec0f776fccec4d8de7d82deea5886a9ec) runtime: stop the configure when Vulkan headers are too old for the Windows runtime ### 📊 Changes **4 files changed** (+154 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `docs/testing.md` (+1 -0) 📝 `runtime/CMakeLists.txt` (+6 -0) ➕ `runtime/cmake/vulkan_headers_version.cmake` (+45 -0) ➕ `tests/test_cmake_vulkan_headers_version.py` (+102 -0) </details> ### 📄 Description > 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) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
bug
pull-request
No milestone
No project
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.

Dependencies

No dependencies set

Reference
starred/leonida#322
No description provided.