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

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

@⁠Andretuta on GitHub · 2026-11-24 02:56 UTC · original
ubiquitarianism:old-pr/9998 → main · +154 −0 · 4 files · 1 commits · draft

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

**@⁠Andretuta** on GitHub · 2026-11-24 02:56 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/269) `ubiquitarianism:old-pr/9998` → `main` · +154 −0 · 4 files · 1 commits · draft > 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)
Any vulkan/vulkan.h used to be accepted, so headers that are too old (conda-forge's
vulkan-headers resolves to 1.3.231 next to llvm-tools) configured fine and then failed
deep in the build: d3d12_com.h(42) "'calibrated': unknown override specifier" and 100+
errors in d3d12_vulkan_device.cpp, or VkPhysicalDevicePipelineBinaryFeaturesKHR in
vk_harness.cpp.

runtime/cmake/vulkan_headers_version.cmake reads VK_HEADER_VERSION from the headers
Vulkan::Headers points at (FetchContent's $<BUILD_INTERFACE:...> unwrapped) and fails
with the found and needed versions and how to fix it. The minimum, 294, is measured by
building the whole Windows runtime against Khronos header tags: v1.3.294 and SDK
1.4.304.0 build all 555 targets, SDK 1.3.280.0 all but vk_harness, 1.3.231 stops in the
D3D12 layer. Only Windows-runtime configures check, so the portable Linux/macOS tool
builds keep accepting older distribution headers.

tests/test_cmake_vulkan_headers_version.py runs the module with cmake -P on stub
headers and checks that the FetchContent and CI pins meet the minimum.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:51:22 +00:00
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/269/head:github-bot/gh-269'
git switch 'github-bot/gh-269'

Merge

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