make_game: warn when the runtime stage runs without VULKAN_SDK (MAKE-GAME-VULKAN-SDK-WARN) #639

Merged
DesertGamer merged 1 commit from upstream-pr/639 into main 2026-11-25 21:25:11 +00:00
DesertGamer commented 2026-11-24 10:41:31 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by DesertGamer on 2026-11-24T10:41:31Z.


Claimed in the coordination issue as: MAKE-GAME-VULKAN-SDK-WARN (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7129032727)

What and why

make_game.py checks VULKAN_SDK in preflight only for the pipelines stage. A Windows runtime stage with no
VULKAN_SDK passes preflight and builds a runtime that may have no Vulkan D3D12 device: scripts/build_runtime.ps1
passes -DLEONIDA_REQUIRE_VULKAN=ON only when the variable is set, otherwise CMake only warns that the Vulkan headers
are missing and the build still succeeds. LEONIDA_D3D12=vulkan is then ignored without a word, and a boot
measurement taken with that runtime looks like a Vulkan one but runs on the Windows D3D12 device. This is how a
terminal that was opened before the Vulkan SDK installer set VULKAN_SDK produced a wrong measurement.

preflight now prints a warning in that case (Windows, runtime stage, no --runtime-build, VULKAN_SDK unset or
empty). It does not stop the build, because a runtime without Vulkan is still valid, and it says "may" because the
headers can also be found some other way. The warning comes after the required-prerequisite check, so it never
duplicates a failure.

Tested

  • python -I tests/test_make_game_pipeline_preflight.py: 23 tests, OK (1 skipped on Windows). Three are new: the
    warning appears once for an unset and for an empty VULKAN_SDK, it is absent with the SDK set, and it is absent for
    a prebuilt --runtime-build and on a non-Windows system.
  • With the make_game.py change reverted the new warning test fails (2 subtests), with it applied it passes.
  • Every tests/test_make_game_*.py and tests/test_spirv_stubs.py passes.
  • Windows 11 Pro 10.0.26200, Python 3.14.6. A full runtime build was not run for this change.

GPUs tested: n/a

AI-assisted: yes (Claude Code, Sonnet 5.5)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • 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.
<!-- greyfinch-sync:ubiquitarianism/leonida:issue:5470595652 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/639). Originally posted by [DesertGamer](https://github.com/DesertGamer) on 2026-11-24T10:41:31Z. --- Claimed in the coordination issue as: MAKE-GAME-VULKAN-SDK-WARN (https://github.com/ubiquitarianism/leonida/issues/14#issuecomment-7129032727) ### What and why `make_game.py` checks `VULKAN_SDK` in `preflight` only for the pipelines stage. A Windows runtime stage with no `VULKAN_SDK` passes preflight and builds a runtime that may have no Vulkan D3D12 device: `scripts/build_runtime.ps1` passes `-DLEONIDA_REQUIRE_VULKAN=ON` only when the variable is set, otherwise CMake only warns that the Vulkan headers are missing and the build still succeeds. `LEONIDA_D3D12=vulkan` is then ignored without a word, and a boot measurement taken with that runtime looks like a Vulkan one but runs on the Windows D3D12 device. This is how a terminal that was opened before the Vulkan SDK installer set `VULKAN_SDK` produced a wrong measurement. `preflight` now prints a warning in that case (Windows, `runtime` stage, no `--runtime-build`, `VULKAN_SDK` unset or empty). It does not stop the build, because a runtime without Vulkan is still valid, and it says "may" because the headers can also be found some other way. The warning comes after the required-prerequisite check, so it never duplicates a failure. ### Tested - `python -I tests/test_make_game_pipeline_preflight.py`: 23 tests, OK (1 skipped on Windows). Three are new: the warning appears once for an unset and for an empty `VULKAN_SDK`, it is absent with the SDK set, and it is absent for a prebuilt `--runtime-build` and on a non-Windows system. - With the `make_game.py` change reverted the new warning test fails (2 subtests), with it applied it passes. - Every `tests/test_make_game_*.py` and `tests/test_spirv_stubs.py` passes. - Windows 11 Pro 10.0.26200, Python 3.14.6. A full runtime build was not run for this change. GPUs tested: n/a AI-assisted: yes (Claude Code, Sonnet 5.5) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [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.
MoonEyes commented 2026-11-24 14:37:29 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by MoonEyes on 2026-11-24T14:37:29Z.


Verified locally on a throwaway worktree of cf73e3497 (Windows 11, Python 3.14.0):

  • python -I tests/test_make_game_pipeline_preflight.py: 23 tests, OK (skipped=1). All tests/test_make_game_*.py and tests/test_spirv_stubs.py pass.
  • With the make_game.py hunk reverted, the new test fails on both subtests (sdk=None, sdk=''), so it guards the change.
  • Real environment, not mocked: the warning prints once for an unset and an empty VULKAN_SDK, not when it is set, not on posix, and preflight returns normally (the build is not blocked). With runtime,pipelines and no SDK, only the existing prerequisite failure is printed, no duplicate.
  • A whitespace-only VULKAN_SDK gives no warning, which matches build_runtime.ps1 (it then passes -DLEONIDA_REQUIRE_VULKAN=ON and the configure fails loudly), so the two stay consistent.
  • The branch is 37 commits behind main but git merge-tree reports no conflict, and none of the touched code changed on main since the merge base.

Looks correct to me.

AI-assisted review (Claude Code).

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7134680088 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/639#issuecomment-7134680088). Originally posted by [MoonEyes](https://github.com/MoonEyes) on 2026-11-24T14:37:29Z. --- Verified locally on a throwaway worktree of cf73e3497 (Windows 11, Python 3.14.0): - `python -I tests/test_make_game_pipeline_preflight.py`: 23 tests, OK (skipped=1). All `tests/test_make_game_*.py` and `tests/test_spirv_stubs.py` pass. - With the make_game.py hunk reverted, the new test fails on both subtests (sdk=None, sdk=''), so it guards the change. - Real environment, not mocked: the warning prints once for an unset and an empty VULKAN_SDK, not when it is set, not on posix, and preflight returns normally (the build is not blocked). With `runtime,pipelines` and no SDK, only the existing prerequisite failure is printed, no duplicate. - A whitespace-only VULKAN_SDK gives no warning, which matches build_runtime.ps1 (it then passes -DLEONIDA_REQUIRE_VULKAN=ON and the configure fails loudly), so the two stay consistent. - The branch is 37 commits behind main but `git merge-tree` reports no conflict, and none of the touched code changed on main since the merge base. Looks correct to me. AI-assisted review (Claude Code).
aslan2142 commented 2026-11-25 21:25:13 +00:00 (Migrated from github.com)

Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-11-25T21:25:13Z.


Merged, thanks! The new test fails on main and passes with this.

  • Checked on main 7b5232875 + cf73e3497: the semantic suite passes (491 files, 6,312 tests, 0 files failed); test_make_game_pipeline_preflight pass; the 15 docs and writer tests pass; check_no_game_data.py is clean on the 2 changed files.

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

<!-- greyfinch-sync:ubiquitarianism/leonida:comment:7175051796 --> Imported from [ubiquitarianism/leonida](https://github.com/ubiquitarianism/leonida/pull/639#issuecomment-7175051796). Originally posted by [aslan2142](https://github.com/aslan2142) on 2026-11-25T21:25:13Z. --- Merged, thanks! The new test fails on `main` and passes with this. - **Checked on `main` `7b5232875` + `cf73e3497`:** the semantic suite passes (491 files, 6,312 tests, 0 files failed); `test_make_game_pipeline_preflight` pass; the 15 docs and writer tests pass; `check_no_game_data.py` is clean on the 2 changed files. AI-assisted (Claude Code, Claude Opus 5.5).
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!639
No description provided.