make_game: the pipelines stage fills the runtime's own journal with gta6rt --precompile-pipelines (MAKE-GAME-PIPELINES-VIA-RUNTIME) #2392
Closed
leonida/mandy
qhukz13 wants to merge 0 commits from
cont/pipelines-via-runtime into main
pull from: cont/pipelines-via-runtime
merge into: leonida:main
leonida:main
leonida:github-pr/3295
leonida:beta
leonida:docs/changelog-3483-3500
leonida:github-pr/3294
leonida:github-pr/2975
leonida:github-pr/2815
leonida:feat/gate-driver-start
leonida:feat/skip-pipelines-release
leonida:perf/lazy-compare
leonida:perf/mwaitx-wait
leonida:test/prio-ceiling-main
leonida:fix/ab-cpu-stdout
leonida:fix/gate-old-crashes
leonida:diag/ab-cpu
leonida:test/main-0312
leonida:github-pr/3291
leonida:diag/indirect-clamp-census
leonida:feat/barrier-enhanced
leonida:perf/texture-frame-ceiling
leonida:perf/dstorage-threads
leonida:fix/console-queue-dma-tables
leonida:fix/port-descriptors-record-parts
leonida:fix/frame-waits-fence
leonida:fix/console-sampler-words
leonida:fix/graphics-userdata-spill
leonida:fix/xg-reserved-layout-rotation
leonida:fix/barrier-console-flags
leonida:fix/switches-wait-test-child
leonida:test/list-value-waits
leonida:test/lot-gxdk-0412
leonida:fix/bvh-compacted-size
leonida:docs/i18n-quickstarts
leonida:feat/native-pipeline-slots
leonida:fix/clippy-leonida-gpu
leonida:fix/list-value-producers
leonida:fix/descriptor-page-straddle
leonida:fix/xmem-low-window
leonida:fix/ffx-jitter-never-zero
leonida:fix/run-stdout-closed
leonida:github-pr/2892
leonida:github-pr/2896
leonida:feat/warm-save-every
leonida:github-pr/2980
leonida:github-pr/2994
leonida:github-pr/3005
leonida:github-pr/3010
leonida:github-pr/3136
leonida:github-pr/3303
leonida:github-pr/3220
leonida:github-pr/3143
leonida:github-pr/3330
leonida:github-pr/3226
leonida:github-pr/3187
leonida:carry/3395
leonida:github-pr/2946
leonida:github-pr/2947
leonida:github-pr/2945
leonida:github-pr/2983
leonida:github-pr/3001
leonida:github-pr/3372
leonida:github-pr/3128
leonida:github-pr/3296
leonida:github-pr/2588
leonida:github-pr/3119
leonida:github-pr/3378
leonida:fix/crash-diagnostics
leonida:feat/dlss-mip-bias
leonida:fix/retired-out-of-order
leonida:fix/dxr-postbuild-barrier
leonida:fix/amd-relay-default
leonida:fix/removed-report-wait
leonida:feat/heap-twin
leonida:feat/vram-margin
leonida:github-pr/2472
leonida:github-pr/3123
leonida:github-pr/3088
leonida:assets/annonce-v1
leonida:github-pr/2794
leonida:github-pr/3300
leonida:github-pr/3304
leonida:github-pr/3308
leonida:github-pr/3367
leonida:github-pr/3369
leonida:fix/launcher-dlss-diagnostics
leonida:github-pr/3269
leonida:github-pr/2957
leonida:github-pr/3205
leonida:fix/crash-zero-guard
leonida:github-pr/3185
leonida:github-pr/3099
leonida:github-pr/3104
leonida:github-pr/3348
leonida:github-pr/3379
leonida:github-pr/3377
leonida:perf/darner-title-priority-ceiling
leonida:github-pr/3376
leonida:gh-readonly-queue/main/pr-3311-b5c45b663dbc5a9c3532bb3f307e5f81b32faefa
leonida:gh-readonly-queue/main/pr-3088-af22e7847ff5808f72d1a1881c24be2fafd20b54
leonida:gh-readonly-queue/main/pr-3123-7f3fa026a94c6646e89244f28e1ce22290361867
leonida:github-pr/3373
leonida:github-pr/3368
leonida:github-pr/3198
leonida:gh-readonly-queue/main/pr-3354-637baa0b77ba47222e7280b17c1a59c6a1781d57
leonida:gh-readonly-queue/main/pr-3365-d7a0e0196a43834813014b4bd3aa5502a8263b14
leonida:gh-readonly-queue/main/pr-3361-5dfe8bbd05ed12fb2f2e1718d9af77a7c5f46fd8
leonida:gh-readonly-queue/main/pr-3366-8da9148204e9d12c585efa9ac2b7cc1ab08c7682
leonida:github-pr/3346
leonida:github-pr/3375
leonida:github-pr/2958
leonida:github-pr/3151
leonida:github-pr/3307
leonida:github-pr/3278
leonida:github-pr/3374
leonida:fix/runtime-test-conservative-fixtures
leonida:github-pr/3366
leonida:ci/shard-semantic-linux
leonida:github-pr/3354
leonida:docs/fg-limit-fps-switch
leonida:github-pr/3365
leonida:fix/read-file-hard-link
leonida:github-pr/3364
leonida:fix/book-slot-heap-never-read
leonida:github-pr/3361
leonida:github-pr/3263
leonida:github-pr/3360
leonida:github-pr/3353
leonida:github-pr/3331
leonida:fix/alias-later-queued-submissions
leonida:github-pr/3352
leonida:github-pr/3228
leonida:github-pr/3349
leonida:claude/gallant-sagan-aamatr
leonida:github-pr/3200
leonida:github-pr/3132
leonida:github-pr/3323
leonida:github-pr/3332
leonida:github-pr/3340
leonida:github-pr/3311
leonida:github-pr/3334
leonida:github-pr/3297
leonida:github-pr/3256
leonida:github-pr/2567
leonida:github-pr/2851
leonida:d3d12/agility-sdk-621
leonida:github-pr/3164
leonida:github-pr/3114
leonida:github-pr/3050
leonida:github-pr/3113
leonida:github-pr/3326
leonida:github-pr/3144
leonida:github-pr/2642
leonida:github-pr/3072
leonida:github-pr/2789
leonida:github-pr/2643
leonida:github-pr/3009
leonida:github-pr/3035
leonida:github-pr/3031
leonida:github-pr/2686
leonida:github-pr/2834
leonida:github-pr/3321
leonida:github-pr/3325
leonida:github-pr/3290
leonida:github-pr/3324
leonida:github-pr/3130
leonida:claude/fervent-curie-m19lnr
leonida:github-pr/3309
leonida:github-pr/3305
leonida:github-pr/3306
leonida:github-pr/3302
leonida:github-pr/3301
leonida:github-pr/3345
leonida:github-pr/3211
leonida:github-pr/3027
leonida:github-pr/3286
leonida:github-pr/3235
leonida:github-pr/3265
leonida:github-pr/3275
leonida:codex/skip-no-hit-ray-passes
leonida:github-pr/2823
leonida:github-pr/2911
leonida:github-pr/3262
leonida:github-pr/3125
leonida:github-pr/3206
leonida:github-pr/3250
leonida:github-pr/3238
leonida:github-pr/3188
leonida:github-pr/2952
leonida:github-pr/3217
leonida:github-pr/3168
leonida:t3/preserve-fsr-sdk-restart-path
leonida:t3/propagate-host-failure-hresult
leonida:github-pr/3209
leonida:t3/launcher-custom-parameters
leonida:github-pr/3207
leonida:github-pr/3183
leonida:github-pr/3160
leonida:github-pr/3201
leonida:ci/less-to-run
leonida:github-pr/2930
leonida:github-pr/2797
leonida:github-pr/2999
leonida:perf/native-compute-shader-forms
leonida:github-pr/3191
leonida:github-pr/3011
leonida:github-pr/3019
leonida:github-pr/2996
leonida:gh-readonly-queue/main/pr-2789-45dc41f95c1cd0dcc29c2c50582e0e9af8a77259
leonida:claude/blissful-franklin-ukp7ag
leonida:github-pr/3141
leonida:github-pr/3156
leonida:github-pr/3150
leonida:github-pr/3153
leonida:github-pr/3163
leonida:github-pr/3142
leonida:github-pr/3139
leonida:github-pr/2841
leonida:github-pr/3069
leonida:github-pr/3098
leonida:github-pr/3107
leonida:github-pr/3071
leonida:github-pr/2774
leonida:github-pr/2889
leonida:github-pr/3075
leonida:github-pr/2661
leonida:github-pr/3064
leonida:github-pr/3054
leonida:github-pr/3049
leonida:github-pr/2855
leonida:github-pr/2943
leonida:github-pr/3016
leonida:github-pr/2887
leonida:github-pr/3006
leonida:github-pr/3003
leonida:github-pr/2993
leonida:notes/card-time-and-plant-flicker
leonida:github-pr/2989
leonida:feat/vulkan-rs
leonida:github-pr/2985
leonida:github-pr/2951
leonida:github-pr/2982
leonida:github-pr/752
leonida:github-pr/792
leonida:github-pr/2877
leonida:github-pr/2654
leonida:github-pr/2893
leonida:github-pr/2948
leonida:github-pr/2944
leonida:github-pr/2919
leonida:github-pr/2915
leonida:archive/ci/less-to-run/20261202T1121Z
leonida:github-pr/2800
leonida:github-pr/2822
leonida:github-pr/2833
leonida:github-pr/2840
leonida:github-pr/2831
leonida:github-pr/2832
leonida:github-pr/2801
leonida:github-pr/2890
leonida:github-pr/2891
leonida:github-pr/2664
leonida:github-pr/2807
leonida:rt-call-trace
leonida:github-pr/2755
leonida:perf/ahead-split
leonida:github-pr/2587
leonida:github-pr/2698
leonida:github-pr/2609
leonida:github-pr/3219
leonida:docs/readme-runtime-proposal
leonida:github-pr/2017
leonida:github-pr/1741
leonida:github-pr/1667
leonida:codex/coord-claim-check-20261124-7e48
No reviewers
Assignees
Clear assignees
No assignees
Labels
Clear labels
bug
Something isn't working
dependencies
Pull requests that update a dependency file
documentation
Improvements or additions to documentation
enhancement
New feature or request
missing claim
Needs a claim in #14
needs rebase
Conflicts with the base branch: rebase it on main
needs-triage
Needs maintainer evaluation before the next triage state
question
Further information is requested
ready-for-agent
Fully specified and ready for an AFK agent
submodules
Pull requests that update submodules code
No labels
bug
dependencies
documentation
enhancement
missing claim
needs rebase
needs-triage
question
ready-for-agent
submodules
Projects
Clear projects
No items
No project
Milestone
Clear milestone
No items
No milestone
Dependencies
No dependencies set
Notifications
1 participant
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Reference
leonida/mandy!2392
Loading…
Reference in a new issue
No description provided.
Delete branch "cont/pipelines-via-runtime"
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?
Pull request closed
This pull request cannot be reopened because the branch was deleted.
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
@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).
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.
@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).
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).
@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).
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.
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).
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).
Main moved again (461 commits), so I merged it into the branch rather than rebasing a third time: 1776efec7, plus 7efeede0c.
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.test_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 main 4a54aedcb. The runtime side is unchanged since the comment above (ctest 4/4, smoke 5/5).AI-assisted (Claude Code).
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).
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).
@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)Merged
maininto the branch (no force-push). Two things inmainmet this PR, so the merge is not only mechanical:vk_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).
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)
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.