make_game: the pipelines stage fills the runtime's own journal with gta6rt --precompile-pipelines (MAKE-GAME-PIPELINES-VIA-RUNTIME) #2392
Closed
qhukz13 wants to merge 9 commits from
upstream-pr/2392 into main
pull from: upstream-pr/2392
merge into: ProjectLeonida:main
ProjectLeonida:main
ProjectLeonida:claude/loop-total
ProjectLeonida:claude/pops-collision-seed
ProjectLeonida:claude/dstorage-hold-page-reads
ProjectLeonida:claude/host-image-copy-switch
ProjectLeonida:feat/gdk-lifecycle-window-hook
ProjectLeonida:claude/d16s8-uav-nvidia-fallback
ProjectLeonida:feat/mfplat-offline-shim
ProjectLeonida:claude/gameinput-slow-reader
ProjectLeonida:fix/rt-null-barrier-clear
ProjectLeonida:claude/depth-resolve-sample-positions
ProjectLeonida:integration/palmetto-parity
ProjectLeonida:claude/valu-literal-sext
ProjectLeonida:claude/slot74-pool-handle
ProjectLeonida:claude/rgb9e5-uint-alias-view
ProjectLeonida:claude/fssm-root-layout-tables
ProjectLeonida:feat/gdk-speech-display-lifecycle
ProjectLeonida:asset-audio-skip-current
ProjectLeonida:qemmhd/old-9940-rectangle-quad-lists
ProjectLeonida:feat/ws2-offline-shim
ProjectLeonida:qemmhd/rt-d16-unorm-uav
ProjectLeonida:feat/xs-device-stops-7-9
ProjectLeonida:qemmhd/rt-depth-same-base-shapes
ProjectLeonida:qemmhd/rt-lazy-attachment-variant
ProjectLeonida:feat/acphal-xma2-decoder
ProjectLeonida:asset-audio-skip
ProjectLeonida:codex/coord-claim-check-20261124-7e48
ProjectLeonida:feat/xs-frame-pacing-presentx
ProjectLeonida:feat/xs-device-vm-options
ProjectLeonida:old-pr/9844
ProjectLeonida:old-pr/9978
ProjectLeonida:old-pr/9815
ProjectLeonida:old-pr/10057
ProjectLeonida:old-pr/9874
ProjectLeonida:old-pr/9965
ProjectLeonida:old-pr/9863
ProjectLeonida:old-pr/10068
ProjectLeonida:old-pr/10066
ProjectLeonida:old-pr/10067
ProjectLeonida:old-pr/10007
ProjectLeonida:old-pr/10061
ProjectLeonida:old-pr/10065
ProjectLeonida:old-pr/10059
ProjectLeonida:old-pr/10063
ProjectLeonida:old-pr/10055
ProjectLeonida:old-pr/10062
ProjectLeonida:old-pr/10042
ProjectLeonida:old-pr/10041
ProjectLeonida:old-pr/10049
ProjectLeonida:old-pr/10047
ProjectLeonida:old-pr/10046
ProjectLeonida:old-pr/10045
ProjectLeonida:old-pr/10056
ProjectLeonida:old-pr/10043
ProjectLeonida:old-pr/10036
ProjectLeonida:old-pr/10034
ProjectLeonida:old-pr/9984
ProjectLeonida:old-pr/10052
ProjectLeonida:old-pr/10038
ProjectLeonida:old-pr/10033
ProjectLeonida:old-pr/10028
ProjectLeonida:old-pr/10050
ProjectLeonida:old-pr/9891
ProjectLeonida:old-pr/9889
ProjectLeonida:old-pr/10051
ProjectLeonida:old-pr/10019
ProjectLeonida:old-pr/10027
ProjectLeonida:old-pr/10029
ProjectLeonida:old-pr/10031
ProjectLeonida:old-pr/10026
ProjectLeonida:old-pr/9941
ProjectLeonida:old-pr/10030
ProjectLeonida:old-pr/10040
ProjectLeonida:old-pr/9990
ProjectLeonida:old-pr/10021
ProjectLeonida:old-pr/9962
ProjectLeonida:old-pr/10022
ProjectLeonida:old-pr/10020
ProjectLeonida:old-pr/10015
ProjectLeonida:old-pr/10025
ProjectLeonida:old-pr/9886
ProjectLeonida:old-pr/10048
ProjectLeonida:old-pr/10014
ProjectLeonida:old-pr/10011
ProjectLeonida:old-pr/9861
ProjectLeonida:old-pr/10010
ProjectLeonida:old-pr/10008
ProjectLeonida:old-pr/9860
ProjectLeonida:old-pr/10006
ProjectLeonida:old-pr/9920
ProjectLeonida:old-pr/9995
ProjectLeonida:old-pr/10000
ProjectLeonida:old-pr/10016
ProjectLeonida:old-pr/10004
ProjectLeonida:old-pr/10023
ProjectLeonida:old-pr/9982
ProjectLeonida:old-pr/9981
ProjectLeonida:old-pr/9983
ProjectLeonida:old-pr/9970
ProjectLeonida:old-pr/9969
ProjectLeonida:old-pr/9968
ProjectLeonida:old-pr/9971
ProjectLeonida:old-pr/9972
ProjectLeonida:old-pr/9942
ProjectLeonida:old-pr/9963
ProjectLeonida:old-pr/9960
ProjectLeonida:old-pr/9964
ProjectLeonida:old-pr/9985
ProjectLeonida:old-pr/9973
ProjectLeonida:old-pr/9862
ProjectLeonida:old-pr/9953
ProjectLeonida:old-pr/10017
ProjectLeonida:old-pr/9952
ProjectLeonida:old-pr/9955
ProjectLeonida:old-pr/9946
ProjectLeonida:old-pr/9954
ProjectLeonida:old-pr/9938
ProjectLeonida:old-pr/9956
ProjectLeonida:old-pr/9856
ProjectLeonida:old-pr/9947
ProjectLeonida:old-pr/9924
ProjectLeonida:old-pr/9961
ProjectLeonida:old-pr/9927
ProjectLeonida:old-pr/9979
ProjectLeonida:old-pr/10032
ProjectLeonida:old-pr/9926
ProjectLeonida:old-pr/5237
ProjectLeonida:old-pr/9951
ProjectLeonida:old-pr/9931
ProjectLeonida:old-pr/9902
ProjectLeonida:old-pr/9921
ProjectLeonida:old-pr/9994
ProjectLeonida:old-pr/9775
ProjectLeonida:old-pr/9768
ProjectLeonida:old-pr/9905
ProjectLeonida:old-pr/9936
ProjectLeonida:old-pr/9901
ProjectLeonida:old-pr/9904
ProjectLeonida:old-pr/9906
ProjectLeonida:old-pr/9988
ProjectLeonida:old-pr/9908
ProjectLeonida:old-pr/9909
ProjectLeonida:old-pr/9911
ProjectLeonida:old-pr/9912
ProjectLeonida:old-pr/9913
ProjectLeonida:old-pr/9887
ProjectLeonida:old-pr/9916
ProjectLeonida:old-pr/9919
ProjectLeonida:old-pr/9925
ProjectLeonida:old-pr/9933
ProjectLeonida:old-pr/9935
ProjectLeonida:old-pr/9918
ProjectLeonida:old-pr/9879
ProjectLeonida:old-pr/9880
ProjectLeonida:old-pr/9881
ProjectLeonida:old-pr/9996
ProjectLeonida:old-pr/9876
ProjectLeonida:old-pr/9892
ProjectLeonida:old-pr/9899
ProjectLeonida:old-pr/9915
ProjectLeonida:old-pr/9914
ProjectLeonida:old-pr/9872
ProjectLeonida:old-pr/9869
ProjectLeonida:old-pr/9866
ProjectLeonida:old-pr/9819
ProjectLeonida:old-pr/10012
ProjectLeonida:old-pr/9857
ProjectLeonida:old-pr/9893
ProjectLeonida:old-pr/9897
ProjectLeonida:old-pr/9928
ProjectLeonida:old-pr/9868
ProjectLeonida:old-pr/9917
ProjectLeonida:old-pr/9940
ProjectLeonida:old-pr/9873
ProjectLeonida:old-pr/9816
ProjectLeonida:old-pr/10009
ProjectLeonida:old-pr/9900
ProjectLeonida:old-pr/9966
ProjectLeonida:old-pr/9859
ProjectLeonida:old-pr/9843
ProjectLeonida:old-pr/9991
ProjectLeonida:old-pr/10058
ProjectLeonida:old-pr/9883
ProjectLeonida:old-pr/9838
ProjectLeonida:old-pr/9835
ProjectLeonida:old-pr/9959
ProjectLeonida:old-pr/9895
ProjectLeonida:old-pr/9837
ProjectLeonida:old-pr/9858
ProjectLeonida:old-pr/9865
ProjectLeonida:old-pr/9864
ProjectLeonida:old-pr/9840
ProjectLeonida:old-pr/9820
ProjectLeonida:old-pr/4669
ProjectLeonida:old-pr/9848
ProjectLeonida:old-pr/9850
ProjectLeonida:old-pr/9810
ProjectLeonida:old-pr/9799
ProjectLeonida:old-pr/9853
ProjectLeonida:old-pr/9875
ProjectLeonida:old-pr/9831
ProjectLeonida:old-pr/9796
ProjectLeonida:old-pr/9801
ProjectLeonida:old-pr/9813
ProjectLeonida:old-pr/9794
ProjectLeonida:old-pr/7417
ProjectLeonida:old-pr/9781
ProjectLeonida:old-pr/9806
ProjectLeonida:old-pr/9958
ProjectLeonida:old-pr/9809
ProjectLeonida:old-pr/9791
ProjectLeonida:old-pr/9792
ProjectLeonida:old-pr/10053
ProjectLeonida:old-pr/9784
ProjectLeonida:old-pr/9789
ProjectLeonida:old-pr/9849
ProjectLeonida:old-pr/9846
ProjectLeonida:old-pr/9773
ProjectLeonida:old-pr/9785
ProjectLeonida:old-pr/9803
ProjectLeonida:old-pr/9826
ProjectLeonida:old-pr/9839
ProjectLeonida:old-pr/9922
ProjectLeonida:old-pr/9948
ProjectLeonida:old-pr/7189
ProjectLeonida:old-pr/9957
ProjectLeonida:old-pr/9823
ProjectLeonida:old-pr/9807
ProjectLeonida:old-pr/9851
ProjectLeonida:old-pr/9774
ProjectLeonida:old-pr/9830
ProjectLeonida:old-pr/9836
ProjectLeonida:old-pr/9822
ProjectLeonida:old-pr/9783
ProjectLeonida:old-pr/9833
ProjectLeonida:old-pr/9890
ProjectLeonida:old-pr/9770
ProjectLeonida:old-pr/9769
ProjectLeonida:old-pr/9772
ProjectLeonida:old-pr/9787
ProjectLeonida:old-pr/9852
ProjectLeonida:old-pr/9834
ProjectLeonida:old-pr/9845
ProjectLeonida:old-pr/9871
ProjectLeonida:old-pr/9771
ProjectLeonida:old-pr/9776
ProjectLeonida:old-pr/10005
ProjectLeonida:old-pr/9949
ProjectLeonida:old-pr/9923
ProjectLeonida:old-pr/9805
ProjectLeonida:old-pr/9829
ProjectLeonida:old-pr/9790
ProjectLeonida:old-pr/9827
ProjectLeonida:old-pr/9929
ProjectLeonida:old-pr/9855
ProjectLeonida:old-pr/9934
ProjectLeonida:old-pr/9907
ProjectLeonida:old-pr/9910
ProjectLeonida:old-pr/9779
ProjectLeonida:old-pr/9780
ProjectLeonida:old-pr/9885
ProjectLeonida:old-pr/9882
ProjectLeonida:old-pr/9877
ProjectLeonida:old-pr/9998
ProjectLeonida:old-pr/4251
ProjectLeonida:old-pr/9987
ProjectLeonida:old-pr/9989
ProjectLeonida:old-pr/9950
ProjectLeonida:old-pr/9777
ProjectLeonida:old-pr/10044
ProjectLeonida:old-pr/9884
ProjectLeonida:old-pr/2906
ProjectLeonida:old-pr/5076
ProjectLeonida:old-pr/9937
ProjectLeonida:old-pr/9986
ProjectLeonida:old-pr/3014
ProjectLeonida:old-pr/9943
ProjectLeonida:old-pr/9939
ProjectLeonida:old-pr/4682
ProjectLeonida:old-pr/4765
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Assignees
Clear assignees
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!2392
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2392"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-26T17:42:49Z.
Claimed in the coordination issue as: MAKE-GAME-PIPELINES-VIA-RUNTIME (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7198052250, corrected in https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7198532316)
Touches the code this replaces in: #2113, #1407, #846, #285, #1319 and #2042 (all on the
vk_pipeline_checkside of the stage). Built on top of RT-PRECOMPILE-SKIP-LIST-EXPLICIT (@aslan2142, now in main): this keeps its entry selection and its summary wording (check_precompile_skip_list.cmakepasses).What and why
make_game.py --stages pipelinesranvk_pipeline_checkover the translated shaders and wrote onepipeline_cache.bin. The runtime never hits that cache, which the maintainers' status lists as "vk_pipeline_check never matches the runtime's cache keys":pipeline_cache.d/cs-<key>.bin.pApplicationName, its own executable name, robustness off, a different extension set, a different bindless set-0 layout,VK_SHADER_STAGE_ALLpush constants for bound compute, and nodecide_subgroup_size/REQUIRE_FULL_SUBGROUPS.docs/running.mdtold players to skip the stage for that reason.Closing those gaps one at a time in the checker would copy the runtime's device and layout code into a second program.
gta6rt --precompile-pipelinesalready is that program: the same device, layouts,build_compute_pipelineand journal names as play. So the stage now runs it.The change
make_game.py(stagepipelines):gta6rt.exe --precompile-pipelines --threads <jobs>, using the one in--out, else--runtime-build, else the default build folder. It runs natively on Windows and under Wine elsewhere, withWINEhonoured.LEONIDA_SHADERSandLEONIDA_PIPELINE_CACHE_DIRpoint at the run'swork/shaders/spirvand--out, converted toZ:\...under Wine, unless the user set them.[precompile] i/nlines drive the stage's progress.PIPELINE_CRASH_RETRIES(5).<out>/pipeline_crashes.jsonas before, with each module's SHA-256.gta6rt.exemust exist; off Windows, Wine must exist. Off Windows without the cross-build or Wine, the default stage list dropspipelinesalong withruntime.vk_pipeline_checkdriving code goes: the exe lookup, staleness check, Linux auto-build, 500-entry batching and the BVH seeding pass. The precompile loadsbvh/,fspx*/,exe/andlibrary/itself.vk_pipeline_check, its tests, docs and the CI step that runs it stay: it remains the driver-acceptance checker.gta6rt --precompile-pipelines: a module that kills the run is skipped next time. Before this, a crashed build left nothing behind: therequests/<name>.buildinglock isDELETE_ON_CLOSE. A rerun built the same module first again and died again.runtime/src/precompile_inflight.h:requests/inflight.txtlists<name> <key>for the entries inside the driver, rewritten before each create and after it. The key is the module file (size and last write, no read of the module) on this device and driver.requests/crashed.txtand skips an entry while its key is the one that crashed. Each gets a line, the summary adds, N crashed a run(only when N is not 0, so main's wording stands), and the exit code is 2.--alltries every recorded one now.requests/precompile.lock), so a leftover list can only be a dead run's. A second one exits 3, which the stage reports as such, not as a device failure.--listtouches nothing.LEONIDA_PRECOMPILE_CRASH_TEST=<entry>ends the run just before that entry's create, so the crash path is tested by a real process death.Graphics pipelines leave the stage. The runtime builds them at the title's draw from the PSO and the bound formats, and the checker's stub-paired pipelines never matched those (docs/d3d12_vulkan.md). Ordering them ahead of play is #2220 / #2260's work.
Docs updated:
README.md,docs/running.md,docs/linux_proton.md,docs/linux.md,docs/pipeline_check.md,docs/d3d12_vulkan.md. Only the lines about the stage changed; the skip-list text and timings are left to RT-PRECOMPILE-SKIP-LIST-EXPLICIT.Tested
Windows 10 Pro 19045, MSVC 14.44 RelWithDebInfo, GTX 1050 Ti (NVIDIA), on main
2d43417d4. No game files: two or three authored compute shaders (OpExecutionMode LocalSize n 1 1) written to a temporary library.precompile_inflight_test(new, standard library only):-fsanitize=address,undefinedand with ThreadSanitizer;crashed.txtremoved, it fails at the dead-run check.gta6rt --precompile-pipelineswith real process deaths (LEONIDA_PRECOMPILE_CRASH_TEST), 17 checks, all pass:0xC0000005and leaves<name> <key>ininflight.txt;crashed.txt, exits 2 with main's summary wording plus, 1 crashed a run, and keeps skipping it while the module file is unchanged;--allbuilds a freshly crashed entry and clears the list;--listwrites nothing.main's
precompile_skip_listpasses alongsideprecompile_inflight.The stage end to end on the same machine, through
make_game.pipelines()with that build as--runtime-build:<out>/pipeline_cache.d, progress3/3;pipeline_crashes.jsonnaming it.make_game.py's CLI asks for a game package before any stage, so the run calls the stage function directly.Python test files, on Windows (Python 3.12) and Linux (Python 3.14.8):
test_make_game_pipelines(rewritten around a fakegta6rt: arguments, environment, Wine paths, progress, exit codes 0/1/2/3, the retry limit,<name> <key>lines →pipeline_crashes.json, one warning);test_make_game_pipeline_preflight(rewritten);test_make_game_dry_run,test_make_game_platform,test_make_game_argparse,test_make_game_preflight,test_leonida_tui;tests/test_make_game_*.py, plustest_ctest_registration,test_text_write_line_endingsandtest_docs_env_vars.test_make_game_pipeline_batches.pyis removed with the batching it tested.Every standalone
tests/test_*.pyon Linux (544 files): no new failure. The one failing file,test_calibrated_texture_extra(test_export_file_replacement_failure_cleans_temporary_file), fails the same way on main935a2cd5b. The pytest-only files were not run here.python -m compileall,make_game.py --help,scripts/check_no_game_data.pyon every changed file, andgit diff --check: clean.Off Windows the stage now needs Wine and a Windows
gta6rt.exe, as playing does; theshaders,assetsandruntimestages do not. On a machine without them the stage says so in preflight.Not tested: a real game library, and the stage under Wine (the Wine command line is covered by the tests, not run against a real Wine).
GPUs tested: NVIDIA GeForce GTX 1050 Ti, Windows 10.
AI-assisted: yes. Antigravity (Gemini 4 Neon) wrote the implementation plan and the
make_game.py, test and docs changes. Claude Code wrote the runtime part, reviewed the rest, and ran the builds, tests and mutant.Checklist
mainand merges cleanly (a conflicting pull request is labeledneeds rebase).docs/design.md, with how it was confirmed. (n/a: no translator change)🤖 Generated with Claude Code
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-26T18:01:58Z.
Review: COMMENTED
Built
gta6rtand the inflight test at this head with MSVC on Windows 11.precompile_inflightpassed and the Python pipeline tests ran 25 passes with one skip. With a synthetic compute shader, I ran the actualmake_game.pipelinesstage twice: the first run created one native journal entry, and the second reported it as already journaled and preserved bytes and mtime. GPU: NVIDIA GeForce RTX 5070, 610.88. This checks stage-to-runtime integration and journal reuse by the stage.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by wavehs on 2026-11-26T18:50:18Z.
Review: COMMENTED
macOS arm64 check of #2392 (MAKE-GAME-PIPELINES-VIA-RUNTIME). Python build driving, the dashboard/docs, a new Windows-side precompile journal and the portable header its test covers.
Two commits, head
8a73cb09b. It does not merge ontomainbdbc7e923:git merge-tree --write-treeexits 1 with conflicts indocs/d3d12_vulkan.md,docs/linux_proton.md,docs/running.mdandruntime/shims/d3d12_vulkan_device.cpp. The whole conflict is with one upstream commit,76109561f("--precompile-pipelines builds the skip-listed programs unless --skip-listed"), which is not in the branch's merge base935a2cd5b. I tested the head tree as authored (a cleangit archiveof8a73cb09b) and report the merge separately below.Environment: Apple M3 Pro, arm64, macOS 27.2.1, Apple clang 21.0.0, CMake 4.5.0, CPython 3.15.2.
What ran
runtime/test/precompile_inflight_test.cppis portable (standard library,Threads::Threadsonly, registered atruntime/CMakeLists.txt:892-895outside the WIN32 block). Configured the head tree with CMake on macOS and built the target through CMake: OK. Ran it:precompile_inflight_test: ok. Also built it standalone with-fsanitize=address,undefined: pass, no report.tests/test_make_game_*.pyplustests/test_leonida_tui.pyon the head tree: all OK (skips: argparse 1, paths 2, preflight 2).make_game.pyback to the merge base935a2cd5b. Every changed suite fails -test_make_game_pipelines.py13 errors of 14,test_make_game_pipeline_preflight.py16 of 13 cases (subtests),test_make_game_dry_run.py5 errors,test_make_game_platform.py2 failures + 3 errors,test_make_game_argparse.py1 failure,test_make_game_preflight.py1 error,test_leonida_tui.py1 error.python -m compileall -q make_game.py tools tests: clean.python -I make_game.py --help: OK.tests/test_make_game_pipelines.py:269-344pin exit 2 (warn, stage succeeds), exit 1 (fail, no retry), an NT interrupt status (no retry), one crash then success (retry line,pipeline_crashes.jsonwith the module's SHA-256), the retry limit, and a stale report being dropped.gta6rt.exe(no MSVC/Wine), so the real precompile, the lock, the inflight journal on a device and CTest'sprecompile_skip_listare unexecuted.The macOS/off-Windows path is graceful. Called the stage directly on this machine (
make_game.pipelines(work, out)), three failure modes, all exit 1 with the intended message and no traceback:That includes the macOS-specific
clang-cl + xwinhint. I could not get further: the stage genuinely needs a Windowsgta6rt.exeunder Wine on this platform, and there is no Wine here. If macOS is meant to be able to run--stages pipelines, that is now a Wine + Windows-Vulkan requirement that did not exist before this PR; the preflight says so clearly, but it is worth stating in the PR that macOS users are expected to runshaders/assets/runtimeonly, or to accept Wine.Findings
The rebase is not optional; a naive resolution drops main's skip-list reporting and fails a CTest. Main's
76109561faddedfiltered,listed_left_out, theif (listed && !options.skip_listed)message and theleft out: N of M listed in LEONIDA_SKIP_COMPUTEwording to the same twofprintfblocks this PR rewrites (runtime/shims/d3d12_vulkan_device.cpp:22389-22412and:22514-22529in the conflicted file). Main also addedruntime/test/check_precompile_skip_list.cmake, which asserts that line character for character::96expects[precompile] done: ... 0 failed; left out: 0 of 1 listed in LEONIDA_SKIP_COMPUTE, 0 not buildable, 0 filtered out; in N s:105expects1 compute entries to build (... , 1 left out by --skip-listed, 0 not buildable)The head's replacement lines (
"[precompile] %zu compute entries to build (%.1f MB of SPIR-V; %zu filtered out, %zu not buildable, %zu crashed a run), ..."and"done: %zu compiled, ... %zu not buildable, %zu crashed a run, in %.0f s") match neither: they have no "left out ... listed in LEONIDA_SKIP_COMPUTE" text, andcrashed a runsits where the regex requires)or, 0 not buildable). Taking the PR's side in those two hunks would leaveprecompile_skip_listred after the rebase. The merge must keep main's two sentences and add the crashed count, e.g.... %zu filtered out, %zu crashed a run)and... left out: %zu of %zu listed in LEONIDA_SKIP_COMPUTE%s, %zu not buildable, %zu filtered out, %zu crashed a run; in %.0f s. I verified the regexes against both sides; I did not resolve the merge myself.make_gamemislabels the new "another precompile holds the lock" exit.runtime/shims/d3d12_vulkan_device.cpp:22322-22324returns 1 whenrequests/precompile.lockis held by another process, andmake_game.py:2861maps every exit 1 togta6rt could not open the Vulkan device or shader library. Exit 1 is alsohost.open()failing (:22272), so the code is shared; a user who starts two stages, or a stale window, is told the Vulkan device is broken. Either give the lock its own exit status (2 is taken for "built, some failed"; 3 is free) and a branch inpipelines(), or havepipelines()pass the child's last line through when it matchesanother --precompile-pipelines is using.A crashed entry stays skipped for good, and
make_gamehas no way to retry it.runtime/src/precompile_inflight.hdeliberately keepscrashed.txtacross runs (pinned byruntime/test/precompile_inflight_test.cpp:55-58), and only--all(runtime/src/main.cpp:291, which setsrebuild) clears it.make_game.py's command line is[exe, "--precompile-pipelines", "--threads", N](:2717) and never passes--all; the warning at:2846-2848names the entries andpipeline_crashes.jsonbut not how to retry. So after the cause is fixed - the case that matters most, a translator change to that module - every latermake_game --stages pipelinesleaves it out of the journal again, exits 0, and prints the same warning. The impact is bounded (the title compiles that pipeline at play, as before the PR), but the stage's whole value is filling the journal, and the retry is invisible. A--retry-crashed(or forwarding--allwhen the user deletescrashed.txt) plus one sentence indocs/pipeline_check.md:352-354would close it. I could not test the retry end to end here; the finding is from the flag wiring and the C++ test.Nit: when the first run exits 2, the stage logs the
exit 2warning (:2858) and thencollect_crashes()logs a secondWARNING: N compute entry(ies) crashedfor the same entries, so one failure reads as two.collect_crashes()runs unconditionally after the loop; skipping the repeat whencode == 2already reported it would halve the noise.Not re-run: the shader corpus and GPU fixtures. No translator,
scripts/run_gpu_tests.pyor runtime test-harness change; the same-main baseline stands (195 PASS / 3 FAIL / 70 SKIP MoltenVK, 190 / 5 / 73 KosmicKrisp atbdbc7e923).python -I scripts/check_no_game_data.pyon all changed files: clean.No game files. AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-26T19:28:56Z.
@wavehs thank you, all four were right. Fixed in the force-pushed head, rebased on main
2d43417d4:precompile_compute_pipelinesis main's version with this PR's part added on top.... left out by --skip-listed, N not buildable).done:line is main's sentence word for word., N crashed a runis added before; inonly when N is not 0, socheck_precompile_skip_list.cmake's exact regexes still match.requests/precompile.locknow exits 3, and the stage reports "another gta6rt --precompile-pipelines is using this pipeline journal" instead of the device message. There is a test for it.inflight.txt/crashed.txtlines are<name> <key>.--allstill forces every one.docs/pipeline_check.md.So that the crash path can be tested for real and not only by planting files,
LEONIDA_PRECOMPILE_CRASH_TEST=<entry>ends the precompile just before that entry's create.Tested again: GTX 1050 Ti, NVIDIA 582.66, Windows 10, MSVC RelWithDebInfo.
precompile_inflightand main'sprecompile_skip_listpass. The latter shows the summary lines kept their exact wording.cs_beta's create ends the run with0xC0000005. The next run namescs_beta, skips it, recordscs_beta <key>and exits 2, and keeps skipping it while the file is unchanged. Rewriting the module makes the next run build it and clear the list.--allretries a fresh crash. A held lock exits 3, and--listwrites nothing.make_game.pipelines()with a crash planted incs_gamma: the first attempt dies, the retry skips it, the stage completes, prints one warning that namescs_gammaand says how it is retried, and writespipeline_crashes.json.precompile_inflight_testunder GCC 14 with ASan/UBSan and TSan, and the 15test_make_game_pipelinescases plus every touched test file.On macOS: yes, off Windows the stage now needs Wine and a Windows
gta6rt.exe, like the game itself. I'll add a sentence to the PR saying that the other stages don't need it.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by akimfomin on 2026-11-26T20:09:31Z.
The RTX 5070 review already checked that a second stage run preserves the journal bytes and timestamp. To check whether a fresh runtime gets a driver cache hit, Continued has a useful positive control in the #821 test, lines 363–417. For one synthetic compute pipeline, compare the journal written by this PR with a cache the consuming device wrote itself. Check the valid and application-cache-hit bits. If even the control misses, the driver result is inconclusive. The older test used the checker’s seed, so the input to adapt is the new journal.
Would that control change what you test before accepting runtime cache reuse? PortBridge’s one-PR comparison found it on the earlier revision. On the rebased head the search follows the crash code instead. You or your agent can use the linked test directly. If you try it, a one-line result or reason to skip is enough. No installation or private inputs needed.
AI-assisted source review.
Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-26T20:37:55Z.
@akimfomin thanks, good control. I ran it rather than adapting the old seed test: #2198's
scripts/check_precompile_verify.py --require-hit(head95267b8c7, built with MSVC on a GTX 1050 Ti, NVIDIA 582.66, Windows 10). It warms the journal withgta6rt --precompile-pipelinesin one process, then--verifyin a fresh one, and requires the driver's application-cache-hit bit. Result:driver reported application-cache hit: True. This PR's stage only runs that same--precompile-pipelines, so the journal it writes is the one that control checks.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by lixonik on 2026-11-26T20:43:03Z.
Review: COMMENTED
Retested the rebased head
f445e3f7on Windows 11, MSVC, RTX 5070 and NVIDIA 610.88.precompile_inflightandprecompile_skip_listpassed. The two targeted Python files had 26 passes and 1 skip. Running the actualmake_game.pipelines()twice produced one native journal entry and preserved its bytes and mtime on the second run.I also tested the fresh-process cache question. I used the same synthetic compute module for three runs of the #2198
--verifydiagnostic (95267b8c7). An empty journal gavemissing_or_unusable=1. A journal written by the diagnostic executable itself gaveverified=1. The journal written by this PR's actualmake_game.pipelines()also gaveverified=1in a separate verifier process, with the application-cache-hit bit required. The verifier left both populated journals unchanged.AI-assisted.
Imported from ubiquitarianism/leonida. Originally posted by kurrutako on 2026-11-27T17:03:54Z.
Tested
f445e3f7dwith the real game library: Windows 11, MSVC RelWithDebInfo, RTX 5070 12 GB, NVIDIA 621.01. I used a shader pack translated by mainfbf100b1b(wave64 emulation on). I ranmake_game.py --stages pipelines --runtime-build <PR build>for 20 minutes into an--outholding a copy of a journal that main's--precompile-pipelines --max-bytes 2097151had filled (3,862 entries). The PR'sprecompile_inflightandprecompile_skip_listpassed.1. A stage that is stopped marks the entries it interrupted as crashed. I stopped the stage's
gta6rtfrom outside (Stop-Process, exit0xffffffff). The stage loggedgta6rt crashed (4294967295 (0xffffffff)); retrying (1/5) so the runtime skips the in-flight entry. The retry then moved the 4 entries that had been inside the driver intorequests/crashed.txt. None of them had crashed: they were large modules that had been building for several minutes. Three of the four are game lighting compute programs that a dispatch uses, not ray-tracing ones. Later runs skip them until the module or driver changes.inflight.txtbehind, so the next run makes the same move.0xC0000005and similar) from a termination before retrying and recording. Or a stopped run could leave its list in a state the next run does not count.2. The retry outlives the stage. After the stage's Python process ended, the retried
gta6rtkept running and heldrequests/precompile.lock. The next stage run therefore failed with exit 3 ("another gta6rt --precompile-pipelines is using this pipeline journal") until I ended that process by hand.3. With the real library, the stage starts with the programs the game is told to skip. The plan line was
5453 compute entries to build (8567.7 MB of SPIR-V; ... 0 left out by --skip-listed ...), largest first, 4 thread(s). Largest first, the first hours go to the 2 MiB-and-larger modules thatdocs/running.mdputs inLEONIDA_SKIP_COMPUTE.--precompile-pipelines --threads 8 --max-bytes 2097151built the 3,950 entries under 2 MiB in 20.6 minutes on this machine. 448 of them failed withVkResult -13.--skip-listedor a size bound, and it does not applyLEONIDA_SKIP_COMPUTEitself. On a 12 GB NVIDIA card a full stage looks like many hours.Not tested: a full stage run, journal reuse by the stage on this library, Wine.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-27T21:20:36Z.
@kurrutako thank you for the run on the real library; all three were real. Fixed in the two new commits on top of the rebase (head
f896a16f4):runtime/src/precompile_inflight.h). An entry left in flight once becomes a suspect (requests/suspect.txt) and is built again. Only a second death on it with the same key holds it as crashed.--parent, below).make_game.pysorts the exit (precompile_exit_kind). A stop ends the stage without a restart. A crash inside a build always restarts, since each one moves the entry on. Only crashes outside a build count againstPIPELINE_CRASH_RETRIES, andPIPELINE_MAX_RESTARTSbounds the stage.gta6rtoutlives the stage. On Windows the stage passes--parent <its pid>; a thread in the runtime waits on that process and ends the run with it. A Wine process cannot watch a host process, so this is Windows only.--smallest-first, so a stage stopped part way has built as many entries as it could. It also passes--skip-listedwhenLEONIDA_SKIP_COMPUTEis set.Also new: the stage sets
LEONIDA_DEVICE_FAULT=1unless you set it. On NVIDIA that value is part of every journal file's name, andscripts/windows-boot/boot.ps1boots with it, so without it the boot read none of the stage's journal (#2481's seed included).The 448
VkResult -13you saw are main's. #2438 looks like the cause (ASSUMED for your run; MEASURED here): on our GTX 1050 Ti, main fails 5valu_fuzz --family memprograms withNVVM compilation failed: 3, and #2438 none.Tested (MEASURED, n=1 each) on a GTX 1050 Ti 4 GB desktop (profile S), NVIDIA 582.66, Windows 10, MSVC RelWithDebInfo:
precompile_inflightandprecompile_skip_listpass;tests/test_make_game_pipelines.py: 22 OK (2 POSIX-only skips);LEONIDA_PRECOMPILE_CRASH_TEST, 15/15:--allclears it;--parentof a process that has ended stops the run;precompile.lockgives exit 3;make_game's stage restarts twice on a module that crashes every time, then finishes with it skipped and listed inpipeline_crashes.json.A rerun on your library would be the real check, if you have the time. AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by moffington on 2026-11-28T05:40:30Z.
Review of
f896a16f4(basecf1c34128). I used hand-written compute shaders only: no game files and no game boot, so this is not the game run the PR is waiting on. Item 1 should be fixed before merge, item 2 is a suggestion, and item 3 is a question.1. Two tests fail
python -I tests/test_make_game_platform.pyandpython -I tests/test_make_game_dry_run.pyeach have one failure. Both files pass at the base and at81c7fbf1a, and fail from66686c3e2. The expected command lines lack--smallest-first(and, indry_run,--parent <pid>).stdlib-tests-linuxshows thedry_runfailure. That job was also red onmain(b1619e0a3) for a different test, so this is easy to miss.2. Under Wine, a driver segfault is usually reported as a journal conflict
To get a real compiler crash, I used a deliberately corrupted compute module (
spirv-valrejects it) that segfaults NVIDIA's compiler.vkCreateDevicefails forgta6rton this machine without a workaround, so everygta6rtrun below used a local Vulkan layer that caps queue counts.vkCreateComputePipelineson the module exits 139. The same program built for Windows, run under Wine without extra layers, logsException 0xc0000005 in Unix calland exits 3.gta6rt.exeandmake_game.pipelines()(called directly), 10 of 11 crashing runs exited 3. The stage said another precompile was using the journal and did not restart. The other run ended with signal 9 and was reported as stopped, "not a crash".abort()on the calling thread (synthetic) exits 1, which the stage reports as a failure to open the Vulkan device or shader library.precompile_exit_kindmatches codes 0–3 before it applies the non-Windows crash rule.LEONIDA_PRECOMPILE_CRASH_TESTinjects an access violation that surfaces as exit code 5, so it exercises the restart path. The real crashes above surface as 3 and never reach it. One possible fix (untested): outside Windows, require the matching[precompile]message before treating 3 as a locked journal or 1 as a device/library failure. This would not cover the signal 9 case.3. Question about
LEONIDA_DEVICE_FAULTThe stage defaults it to 1. In my test, a later
--precompile-pipelinesrun with it unset found 0 of the stage's 3 journal entries and recompiled them. With=1, it found all 3. I understand that the default matchesboot.ps1, the stage logs this, and the docs say to use the game run's environment. However,run_game_wine.sh,run_wine_session.shand the generated Wine launcher do not set it. Should they, or should the stage default change? I compared precompile runs only. From the code, I expect a game boot to use the same journal names, but I have not tested one.GPUs tested: NVIDIA RTX 3060 12 GB, driver 615.78.08, Linux 7.2.15, Wine 11.20.
AI-assisted (Claude Code, Claude Sonnet 5.5), with a second-pass audit by a separate agent.
Imported from ubiquitarianism/leonida. Originally posted by timbot103 on 2026-11-28T09:19:32Z.
Verified on native Windows 11 + RTX 5080 (16 GB desktop, NVIDIA
616.64,02f71ccfe + #2392 head f896a16f4, default 2 s Windows TDR) in a controlled 3+3 alternating cold A/B — full tables in https://github.com/ProjectLeonida/mandy/issues/2464#issuecomment-7237165210:make_game.py --stages pipelines --no-tui --jobs 16(LEONIDA_DEVICE_FAULT=1,--skip-listedskipping1,480>= 2 MiBshaders): resumed cleanly (rc=0,461 sinternal /462.3 swrapper,3,755.binfiles on disk,0failed,950/951overlap with warm-baseline journal files).Seconds=180, fresh empty runtime cache per run): in-game.bincompiles dropped from1,721 / 1,721 / 1,725→1 / 1 / 1(-99.94%), journal hits1,800+,0disabled warnings,0VK_ERROR_DEVICE_LOST, and meanPresentX/srose+32.3%(12.44–13.09→15.31–18.28/s).Prediction HELD (3+3, non-provisional). No game data attached. AI-assisted (second-agent count audit by Claude Opus 5.5 and Codex GPT-6.2-Sol).
Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-28T11:13:53Z.
Rebased onto
main431ceba4f(no conflicts) and one fix on top,ff501c8bb: a crash is now held against the compile context as well as the module, driver and device.The crash key did not include how the run compiles. NVIDIA's diagnostics config (
LEONIDA_DEVICE_FAULT=1, which the stage sets, or Aftermath) builds with shader debug info. So a module that died twice with it on stayed skipped on runs without it, and the other way round. The key now hashesjournal_name_context, the context the journal names its compute files by: subgroup sizes, the bindless layout, and the diagnostics config with its Aftermath flags. This came up while comparing with #2511's journal stamps.MEASURED on the PC (synthetic modules from the build, no game data):
pipeline_cache_journal,precompile_inflight,d3d12_compile_pool,precompile_skip_list: 4/4 pass.LEONIDA_PRECOMPILE_CRASH_TEST:LEONIDA_DEVICE_FAULT=1hold the module, and the next=1run skips it (exit 2);=0run builds it (exit 0) and clears the record.=0checks (3/5).GPUs tested: GTX 1050 Ti 4 GB (Pascal, profile S), driver 582.66, Windows 10.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-28T11:23:28Z.
Main moved again (461 commits), so I merged it into the branch rather than rebasing a third time:
1776efec7, plus7efeede0c.preflightkeeps main'soverlapargument andshader_asset_jobs. Main'spipeline_check_prerequisite(forvk_pipeline_check) is dropped, because this stage's preflight already asks forgta6rt.exe.pipeline_crashes.jsonthat cannot be removed (63fce8be5).seed_bvh()pass overspirv/bvhis not carried over. READ IN CODE:ShaderLibraryloadsbvh/index.jsonintoentries_(runtime/src/shader_library.h, the sub-folder loop andload_index), andstage_entries("cs"), which--precompile-pipelinesbuilds from, readsentries_. So the 52 XboxBvhBuilder programs are built in the same run.7efeede0cfixes two stale expectations of ours intest_make_game_dry_run.pyandtest_make_game_platform.py, which still expected the command without--smallest-first/--parent.MEASURED: all
tests/test_make_game*.pyandtest_text_write_line_endings.pypass on Linux and on the PC (Windows 10, Python stdlib), excepttest_make_game_preflight.py::test_ensure_submodule_names_the_clone_command_the_readme_gives, which fails the same way on main4a54aedcb. The runtime side is unchanged since the comment above (ctest 4/4, smoke 5/5).AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by Maticcm on 2026-11-28T21:02:53Z.
Independent native Windows verification of
7efeede0c04ea1ec47144f7644daf255e1e73f2cfor the index coverage discussed in #2585. RTX 3080 desktop (10 GiB, driver 630.20), Windows 11 build 26340, Vulkan SDK 1.4.363.1, MSVC 19.50.35717, RelWithDebInfo, Python 3.12.10.I built the exact
gta6rt.exeand calledmake_game.pipelines()with one valid synthetic compute module in each of the root,bvh,library, andfspx_computeindexes. All four modules passedspirv-val. Both runs used one compile thread and the stage's default compile context.pipeline_cache_journal,precompile_inflight,d3d12_compile_pool, andprecompile_skip_list. Python dry-run, platform and pipeline-stage files recorded 89 passes and three skips across 92 tests.This verifies stage discovery and journal reuse with synthetic inputs. No game boot or performance measurement. AI-assisted (Codex).
Imported from ubiquitarianism/leonida. Originally posted by kurrutako on 2026-11-29T08:18:58Z.
Reran
7efeede0con the same machine and the real game library: Windows 11, MSVC RelWithDebInfo, RTX 5070 12 GB, NVIDIA 621.01, the same shader pack. I ranmake_game.py --stages pipelines --runtime-build <PR build>into the same--outand cleared the stalecrashed.txtandinflight.txtfrom the last test first. All three problems from my last comment are fixed here.1. A kill from outside no longer holds entries as crashed. About 4 minutes in, I stopped the stage's
gta6rtwith Stop-Process, as before.gta6rt crashed (4294967295 (0xffffffff)) while the driver built <4 entries>; restarting.the last run ended while the driver built it; built again (one death may be a kill from outside)).crashed.txtwas never written, andrequests/was empty at the end.0xffffffff) still counts ascrashinprecompile_exit_kind, because it is above0x80000000. With the two-strike rule that does no harm. But if a user ends the task twice while the same large module is building, that module is held as crashed.2. No
gta6rtoutlives the stage. I ended the stage's Python process twice from outside.gta6rtwas left 15 s later.3. Smallest first, and
--skip-listedwithLEONIDA_SKIP_COMPUTE.2500/5453at +5 s).LEONIDA_SKIP_COMPUTEset to the 724 library programs of 2 MiB or more, the stage passed--skip-listed, and the plan was 4729 entries.VkResultfailure (last time, main had 448VkResult -13).Journal reuse: the copy of the journal that main
fbf100b1bfilled was not reused (so far: 0 from journal files). This build's bindless set differs (16384 2D-array, 4096 3D, 4096 1Dbecame65536each), and that layout is part of the journal names, so every entry got a new name. That comes from main, not this PR, but anyone with a journal from before the merge will rebuild it all once. The stage's defaultLEONIDA_DEVICE_FAULT=1matched the journal I copied.Not tested: a full stage run to the end, Ctrl+C or closing the console window, a game boot from this journal, Wine.
AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by OreoFR on 2026-11-29T12:42:20Z.
@qhukz13 this PR now conflicts with
main(README.md,make_game.py). Could you mergemaininto your branch (no force-push needed)? It was verified before the conflict: https://github.com/ProjectLeonida/mandy/pull/2392#issuecomment-7245733023. If there's no update within 24 h, OreoFR may carry it in a new PR that keeps you as co-author (per the maintainers' plan). — OreoFR's agent (AI-assisted)Imported from ubiquitarianism/leonida. Originally posted by qhukz13 on 2026-11-29T14:12:31Z.
Merged
maininto the branch (no force-push). Two things inmainmet this PR, so the merge is not only mechanical:b26e43491) added a batch progress/ETA to the oldvk_pipeline_checkloop (pipeline_costs,pipelines_progress,PIPELINE_COST_EXPONENT,tests/test_make_game_pipeline_eta.py). This PR replaces that loop withgta6rt --precompile-pipelines, which reports its own progress (pipelines: n/N (p%)), so those helpers and their test go with the loop. @Diegobecker07 FYI; if you want the size-weighted ETA on the new progress lines, it can be a follow-up on top of this.scripts/windows-boot/boot.ps1now boots withLEONIDA_DEVICE_FAULT=2(no NVIDIA diagnostics config in the journal names). The stage's default follows the boot script (that is whattest_device_fault_matches_the_boot_scriptchecks, and it caught it), soPIPELINE_DEVICE_FAULTis now"2"; the test anddocs/pipeline_check.mdsay so.README.md:mainrewrote the build section and the passages this PR edited are gone, somain's README is kept;docs/pipeline_check.mdcarries the stage description.main'sinstall_runtime/publishstaging is kept unchanged.MEASURED (laptop, CPython): all 25
tests/test_make_game_*.pyfiles pass on the merged tree (24/24 intest_make_game_pipelines.py). NOT run yet: the Windows build andprecompile_inflight/ smoke runs, because the test PC is off today; I will post them when it is back.AI-assisted (Claude Code).
Imported from ubiquitarianism/leonida. Originally posted by kurrutako on 2026-12-01T08:54:50Z.
Tested head
94e5d09cfon Windows 11 with Python 3.14.6. No GPU run, no game files.On the head
pytest tests/test_make_game_*.py tests/test_leonida_tui.py: 496 passed, 10 skipped.test_find_flag_executes_without_errorwas deselected: it scans the local disks.make_game.py --help: OK.Merging main
cd73ddab7make_game.py: the pipelines stage and the argparse block.tests/test_make_game_dry_run.py.tests/test_make_game_pipelines.py.docs/linux.md.--no-ftz32, thenewline="\n"test writes and the CI job names.test_text_encodingandtest_docs_env_varspass.Failing CI checks
text_encodingonscripts/windows-boot/test_crash_monitor.py;test_interp_computed_ij_fallback;test_mesh_serial_waves;ps_exp_f32_denorm_rt.#846 regression
test_the_crash_report_survives_a_retry_setup_failure(#846).gta6rtthat crashes, then exits 1 on the restart: the stage fails without writingpipeline_crashes.json.collect_crashes()before thedevice/lockedfail()would keep #846's behaviour.AI-assisted (Claude Code)
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T11:53:19Z.
Review: CHANGES_REQUESTED
Keeping #2392 over closed #2113 (
#2113extendedvk_pipeline_check'spipeline_cache.bin, which does not match the runtime's compute cache keys, whereas#2392switchesmake_game.py --stages pipelinesdirectly togta6rt --precompile-pipelinesto populatepipeline_cache.d).Holding from merge until:
main(make_game.py,docs/linux.md,tests/test_make_game_dry_run.py,tests/test_make_game_pipelines.py) are resolved and CI is green.#846'stest_the_crash_report_survives_a_retry_setup_failurecoverage (noted by@kurrutako) is preserved across the merge.(AI-assisted review.)
Imported from ubiquitarianism/leonida. Originally posted by aslan2142 on 2026-12-01T17:25:51Z.
Closing this PR because the legacy C++ Vulkan runtime (and legacy Python shader compiler) is now considered deprecated in favor of the new Rust Vulkan runtime (in progress) and the Rust DX12 runtime (
d3d12/) available now. Thank you for the contribution! If you believe this PR was closed by mistake (for example, if it still applies to active tools,d3d12/, or general docs), please feel free to reopen it.Pull request closed