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

Manually merged
github merged 1 commit from gh-pr/639/head into gh-pr/639/base 2026-11-26 09:13:18 +00:00
Owner

@⁠DesertGamer on GitHub · 2026-11-24 10:41 UTC · original
DesertGamer:fix/make-game-vulkan-sdk-warn → main · +40 −0 · 2 files · 1 commits · merged 2026-11-25 21:25 UTC

Claimed in the coordination issue as: MAKE-GAME-VULKAN-SDK-WARN (#14)

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.
**@⁠DesertGamer** on GitHub · 2026-11-24 10:41 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/639) `DesertGamer:fix/make-game-vulkan-sdk-warn` → `main` · +40 −0 · 2 files · 1 commits · merged 2026-11-25 21:25 UTC Claimed in the coordination issue as: MAKE-GAME-VULKAN-SDK-WARN (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) ### 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.
preflight checked VULKAN_SDK only for the pipelines stage. On Windows the
runtime stage without it passes preflight and can build a runtime without the
Vulkan D3D12 device, because build_runtime.ps1 requires Vulkan only when the
variable is set. LEONIDA_D3D12=vulkan is then ignored silently.

preflight now logs a warning for that case and leaves the build running, since
a runtime without Vulkan is still valid. Three tests cover an unset and an empty
variable, the variable set, a prebuilt --runtime-build and a non-Windows system.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:13:16 +00:00
github manually merged commit cf73e3497a into gh-pr/639/base 2026-11-26 09:13:18 +00:00
Author
Owner

@⁠MoonEyes on GitHub · 2026-11-24 14:37 UTC · original

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).

**@⁠MoonEyes** on GitHub · 2026-11-24 14:37 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/639#issuecomment-7134680088) 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).
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-25 21:25 UTC · original

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).

**@⁠aslan2142** on GitHub · 2026-11-25 21:25 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/639#issuecomment-7175051796) 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).
This discussion has been locked. Commenting is limited to contributors.
No description provided.