Skip to content

make_game: find the Windows pipeline checker after a Visual Studio build - #3468

Open
Desamodeth wants to merge 2 commits into
ItsNotRexed:mainfrom
Desamodeth:fix/pipelines-windows-config-lookup
Open

Desamodeth wants to merge 2 commits into
ItsNotRexed:mainfrom
Desamodeth:fix/pipelines-windows-config-lookup

Conversation

@Desamodeth

@Desamodeth Desamodeth commented Nov 22, 2026 •

Copy link
Copy Markdown
Contributor

BUILD-1016 · Coordination claim

A Visual Studio build puts the native checker under runtime/build/<config>. On Windows, make_game.py --stages pipelines stopped in preflight even after the checker had been built successfully. On Windows, preflight and the pipelines stage use the same search order for vk_pipeline_check.exe. If --runtime-build DIR is supplied, they first try the executable directly in DIR. If it is missing there, or if the flag is omitted, they try runtime/build/, then its RelWithDebInfo, Release, MinSizeRel and Debug subdirectories, in that order. The flat-directory fallback already exists on main. This PR extends it to the four configuration directories. The first file found wins regardless of build date, so an older local checker can be selected when the supplied directory lacks one.

Verified on Windows 11, MSVC 19.44, RTX 5070 (621.24), using a synthetic package manifest and one hand-written compute shader validated with spirv-val. On main (f847748c), the CLI exited 1; invoking the Release binary directly created the pipeline. On this branch the same CLI exited 0, built one compute pipeline, skipped none and wrote a nonempty cache.

The regression test failed for all four configuration folders on the base. All 278 test_make_game*.py tests passed on this branch. The hardware run used Release. No retail files used. AI-assisted.

@whattheflop

Copy link
Copy Markdown
Contributor

AI-assisted independent review of 8099fafbc320334216c65160a15cf7985eeb9c58 against exact parent f847748cc76bd3777f9c070c4034eb2fc1c04e64. No blocking findings. I verified the BUILD-1016 claim in active coordination issue #3381.

  • A fresh x64 Visual Studio 2022 multi-config build with MSVC 19.38 and Vulkan SDK 1.4.363.0 exposed the vk_pipeline_check target and built it with --config RelWithDebInfo. The executable landed in runtime/build/RelWithDebInfo, with no flat executable present. This adds build and lookup coverage for RelWithDebInfo alongside the author’s Release GPU run.
  • Under uv Python 3.12.13, I drove the pipelines CLI with a synthetic manifest and shader index and mocked all subprocess calls. The parent rejected that same config-only layout in preflight. The PR head selected the actual built file in preflight and passed the same path to both the checker capability probe and the pipeline command. Adding an ordinary flat placeholder alongside it made both revisions prefer the flat path throughout.
  • The three focused lookup, preflight and runner test groups passed on both revisions (30 tests at head, 29 at the parent). I checked the Windows wrapper’s flat output, the CMake target’s configuration output, and the existing POSIX lookup and caller contracts.

The built checker was never executed. No GPU, driver, or retail game data was used.

@Dom-in

Dom-in commented Nov 22, 2026

Copy link
Copy Markdown
Contributor

Tested 8099faf merged onto main f847748 (clean merge) on Windows 11, Python 3.13: pytest tests/test_make_game_platform.py: 37 passed, 4 subtests passed. Negative control: the same tests against main's copies of the changed sources give 4 failed, so the tests cover the change.

AI-assisted (Claude Code); runs on my machine.

@memorypressure

Copy link
Copy Markdown

Verified on Linux: the branch no longer merges cleanly — make_game.py and tests/test_make_game_platform.py conflict with the runtime_build parameter added to pipeline_check_exe on main. Resolving locally (supplied build, then flat local build, then the VS configuration folders) and keeping both tests: 40 tests pass in test_make_game_platform plus the other 18 test_make_game_* files. The PR point is real and visible on current main: pipeline_check_exe only probes the flat build path, so a plain Visual Studio build goes undetected. Note it shares both files with #4213, though in different functions. AI-assisted: yes. Tested on Linux (RTX 5080 host, CPU-only run).

Keep the checker from --runtime-build first, followed by the flat local build and the four standard Visual Studio configurations. Cover lookup order and fallback when the supplied build has no checker.

AI-assisted-by: Codex Astra 6.2 High
@Desamodeth
Desamodeth force-pushed the fix/pipelines-windows-config-lookup branch from 8099faf to ae8d5ea Compare November 23, 2026 06:50
@lines9686-rgb

Copy link
Copy Markdown
Contributor

Tested ae8d5ea on Windows 11 (26200), Python 3.12: pass. tests/test_make_game_platform.py OK on this branch; the same test file against the base's make_game.py (3faac55) fails 4, so the new cases cover the Visual Studio configuration folders. Code read: runtime_build is still tried first, then build itself and its RelWithDebInfo/Release/MinSizeRel/Debug subfolders, which is where the VS generator puts vk_pipeline_check.exe. Merges cleanly with main; compileall OK. No game files. AI-assisted (Claude Code).

AI-assisted-by: Codex Astra 6.2 High
@JRamos1993

Copy link
Copy Markdown
Contributor

Tested f24bd448 merged onto main 561b65a8 on Windows 11, CPython 3.14.3, CPU only: pass.

  • python -I tests/test_make_game_platform.py: 44 tests OK (skipped=1).
  • Negative control (make_game.py from main, the PR's tests kept): tests/test_make_game_platform.py 44 tests FAILED (failures=4, skipped=1).
  • py_compile on the 2 changed Python files: OK; git diff --check: clean.

No game files. AI-assisted (Claude Code).

@iksZ2

iksZ2 commented Nov 23, 2026

Copy link
Copy Markdown

Independent Linux CPU check on a 40-core / 62 GiB server, head f24bd44, no GPU/game data:

  • test_make_game_platform.py: 44/44 pass
  • test_make_game_argparse.py: 36/36 pass, 1 skipped
  • test_make_game_preflight.py: 92/92 pass, 1 skipped
  • test_make_game_pipelines.py: 13/13 pass
  • compileall: clean

Base main control: test_make_game_platform.py: 43/43 pass. The PR adds one passing regression test. No Linux blocking issue found.

@wavehs

wavehs commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

Tested f24bd448f on Apple M3 Pro (macOS arm64, CPython 3.15.2, CPU only — the os.name == "nt" branch is exercised through the test's patch): pass.

  • python3 -I tests/test_make_game_platform.py on the head -> 44 tests, OK.
  • Negative control, done on the merged tree because main's make_game.py now imports tools/leonida_tui.py which this branch's older base does not carry: with the merged tree and only the pipeline_check_exe lookup reverted to main's two-directory version, test_windows_finds_local_visual_studio_configurations_in_order fails for all four configurations (Debug, MinSizeRel, Release, RelWithDebInfo), so the new test does pin the new lookup.
  • Head merged into origin/main dde82f27e: 47 tests, and the only failures are 3 that fail identically on plain origin/main (I ran that checkout too) — test_wine_first_boot_uses_the_packaged_game_and_shader_paths, a macOS /var vs /private/var tempfile symlink difference in the expected argv, unrelated to this PR. The new test passes on the merged tree. test_make_game_pipelines.py is OK there as well.
  • Merges cleanly onto origin/main (only make_game.py auto-merges). compileall, python -I scripts/check_no_game_data.py on both files and git diff --check are clean.

Code read: the candidate list is now flat-build first, then RelWithDebInfo, Release, MinSizeRel, Debug, which matches what the wrapper and a Visual Studio generator actually produce, and runtime_build still wins when given — with one behaviour change worth being explicit about in the body: passing --runtime-build used to search only that directory and build/, and now also falls back to the four configuration directories under build/. That is the right fallback for the reported case, but it does mean a stale build/Release/vk_pipeline_check.exe can now be picked up when the requested build directory does not contain the checker; if you would rather keep --runtime-build strict, put the found.extend(...) only in the else of that conditional. The Windows-only os.name guard is untouched, so the Linux branch behaves as before.

AI-assisted.

benthomashull-commits added a commit to benthomashull-commits/Leonida that referenced this pull request Nov 23, 2026
…after a Visual Studio build

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants