Repository navigation
Description
First: thank you for the build and the docs. What follows is a complete build and three runs on an 8 GB laptop card, and one thing I think is worth a look because it is not what the README predicts.
Setup
4a54aed(main, 28 Nov), built bymake_game.pytoD:\Leonidawith--work D:\Leonida-work.- RTX 4060 Laptop 8 GB, i9-14900HX, 32 GB DDR5, Windows 11 build 26300, driver 621.01.
- Runtime rebuilt with
-FetchSdl3because the first build served no input devices at all (gameinput: served without SDL3 (no devices; E_NOTIMPL for every other slot)). After that the pad sits on player 1 and presses register. - Xbox Series package 1.0.2.1,
--display-mode 1920x1080.
Stages, for the record: assets 343,327 models exported (0 failed, 24 min, 223 GB), 26,503 shaders translated, pipelines 26,555 modules ok, 0 failed, 0 skipped in 84 min, pipeline_cache.bin 4.08 GB.
What the runs do
Everything the README describes works: the launch movie plays, the first-run pages respond to the pad, and the run gets past them. Frames are 50-60 a second and the picture is correct.
Then it stops being like that, and geometry is never submitted again. Every sampling of the submit-phase line in two runs reads geometry 0.00 (0) - 27 of 27 samples in one run and 82 of 82 in another, never non-zero. The frames keep coming (52 fps with 523 submissions in 5.0 s) but they carry no geometry, so the window is a black rectangle that does not change a pixel (two screenshots four minutes apart hash identically).
That may simply be where the port is - your README says a first world frame has not been verified on any test machine - and if so this is just another data point for it on an 8 GB card. But two things around it look like a separate problem, which is why I am writing.
1. The pipeline cache does not cover what the runtime asks for
I finished the pipeline stage to 100 % before these runs, and it still compiles 197 pipeline libraries on demand:
compute pipeline library/lib_cs_01394 (210556 B SPIR-V, warmup) build starts at t=125.602 s
compute pipeline library/lib_cs_01018 took 2.5 s to build (211416 B SPIR-V)
... 197 records in one run
My reading is that vk_pipeline_check builds individual pipelines, while the runtime builds linked pipeline libraries (library/lib_cs_NNNNN), and the cache therefore cannot serve them. If that is right, the offline check cannot remove this cost no matter how long it runs, and it would be worth the checker building the libraries too (or the runtime consulting the cache by library hash).
2. The frame rate collapses exactly when those builds start, and the run dies
t<113 s 50-60 fps launch movie and pages
t=113 s 11.77 -> 4.07 fps
t=125.6 s first library build starts
t=153-187 s lib_cs_01056, 01048, 01542, 01410, 01405, 01543 ...
t~190 s unhandled exception 0xc0000005: writing the session pipeline cache before the process ends
one pipeline build still running at exit
At the crash the card held 7,766 MiB (the 4060 Laptop reports a budget near 6,400 MB) and the process 18.8 GB of working set. The same signature came from two earlier runs on the same build with the cache only 79 % done, at t~163 s. So a complete cache changed the timing but not the outcome.
What I am asking
- Is building pipeline libraries on demand the intended path, and is there a switch or an offline step that pre-builds them?
- Is the
geometry 0.00 (0)a known consequence of the pipeline that runs before the world - i.e. the documented "no world frame yet" - or does it point at something in this tree? - Is the
0xc0000005at exit a fault in the session-cache write, or is that message only the handler describing what it was doing? The wording reads like the latter to me, but I would rather ask than guess.
I have the full logs (run-20261128-193908.log, run-20261128-223025.log, run-20261128-223511.log), the checker output and the three screenshots, and can attach or paste whatever is useful. The machine is idle now and I can run anything you want measured.
Activity
Maticcm commentedon Nov 28, 2026
I checked the source at your build,
4a54aedcb6b66525e0c9f72a6ea10263337c9141. The offline stage passes the root SPIR-V directory tovk_pipeline_check, which reads that directory'sindex.json. The stage separately seeds thebvhindex. The runtime also loads separate compute indexes underlibrary/andfspx_compute/; the offline stage at this revision never passes those directories to the checker. So the root checker tally does not establish that those runtime compute entries were seeded. Offline stage · Checker index · Runtime indexes#2392 is already working on this gap by having the pipeline stage call the runtime's own precompiler and populate its journal. This was a source check. I have no measured cache-hit rate or evidence tying the cache gap to the missing geometry.
AI-assisted (Codex).
JoshRob297 commentedon Nov 28, 2026
Intel iGPU data point for this gap, and a case where the helper does not save the run.
Machine: Intel Meteor Lake iGPU, Mesa ANV 26.2.6, 30 GB RAM, Wine 11.22, Linux. Runtime from
main, 1280x720.The front-end load requests a library compute program that Mesa takes a very long time to compile:
The title's watchdog (30 s) fires at
game+0x2215c35before that build finishes, so the run never reaches the landing. Memory is not involved (16 GB free,/tmpon disk).LEONIDA_COMPILE_HELPER=1 LEONIDA_ASYNC_PIPELINES=1starts the helper (it journaled its way to 1,824 files), but the title still hits the same watchdog trap: on this program the helper's build does not finish before the watchdog either.gta6rt --precompile-pipelines --all --threads 4 --big-threads 1lists 8,136 compute entries / 12,373 MB of SPIR-V and stays more than 11 minutes on one program (Jindirect_diffuse_lighting_CS_ScreenProbes_ActivateProbes_9083c094_Wrapped, 25,486,392 B). So on Intel/ANV the offline precompile is the only path, and even it is measured in many minutes per large program; the 30 s watchdog cannot be survived at play time.Two possible directions: (a) a way to make the title's watchdog tolerate a long first-use build, or (b) an Intel/ANV-specific expectation that these programs must be journaled offline before the first run. Either way,
pipeline_cache.bin/journal coverage of the library is what decides whether this GPU boots.YUYING234 commentedon Nov 29, 2026
Thank you - that is the answer I was guessing at, with the code to back it, and it matches what the runtime log showed from the outside:
The run had a complete root cache at the time (26,555 modules ok, 0 failed, 0 skipped, 84 minutes,
pipeline_cache.bin4.08 GB), so those 197 were not the checker's leftovers - they were a population the checker never seeded, exactly as you describe withlibrary/andfspx_compute/. Good to know #2392 is on it; I will re-run and report a before/after cache-hit count when it lands, if that is useful.One more number for the record, since it lines up with JoshRob297's. In our own offline pipeline stage on the RTX 4060 Laptop, the slowest single program was:
That is 13.6 minutes for one program on an NVIDIA card with 24 checker threads, so an Intel/ANV figure of 11+ minutes for the sibling
ActivateProbes_9083c094is the same order - this is not an ANV peculiarity, it is the program.What we could not settle. With the root cache complete the run still ended at about t=190 s with
unhandled exception 0xc0000005while one library build was still running, andgeometryread0.00 (0)in every one of 27 samples across the run - the title never submitted geometry in that phase. I have no evidence that connects the cache gap to that, which is why I am not claiming it; if #2392 makes the library builds go away, that run becomes the clean test of whether the geometry shows up without them.fiestorra commentedon Nov 29, 2026
MEASURED, on an RTX 4090 with the corpus cache this build produces, and READ IN CODE in the runtime: the session cache is never written, and the reason is a cap rather than a missing feature.
So
pipeline_cache.session.binis never created, and every boot recompiles exactly what you are seeing (197 librarieson demand). My own numbers for the same effect: single compute libraries at 17.8 s, 20.0 s and 29.7 s of build time.
LEONIDA_PIPELINE_CACHE_BYTESdoes not fix it. Setting it to 6000000000 changes the line to536,870,912 is 512 MiB, and that is the cap applied to a checkpoint write in
runtime/shims/d3d12_vulkan_device.cpp:The environment variable only lifts the limit of a non-checkpoint save, so the checkpoint path clamps it. A corpus-sized
seed (4.87 GB here) therefore cannot produce a session file by construction, with or without the variable.
persist through a bug - it is a save that is refused for size. The three ways out I can see are raising the cap (with the
cost of writing ~5 GB at a checkpoint, unmeasured), seeding from something under 512 MiB, or writing only new entries -
and the code's own comment argues the last one is the only incremental answer, since "a prefix is not an incremental
cache".
What I have not measured: whether a session file written with the cap raised actually absorbs those compiles, and what
writing 4.87 GB mid-run costs. Both need the cap raised first, which is a code change; I have a knob for it in a
measurement tree (
LEONIDA_PIPELINE_CACHE_CHECKPOINT_BYTES) but no PR, because I have not run the A/B that would say ithelps.
If it is useful, the check that decides it is one variable: same run, one with the cap raised and one without, and see
whether the second boot still builds those libraries.
Written with an AI assistant.
fiestorra commentedon Nov 29, 2026
That last measurement is the important one, and it matches what I see on this machine: with a complete root cache the
run still ends around t=190 s with an unhandled exception. So once the compiles are out of the way, what is left is the
failure I have been chasing, and it is not the cache.
For the record, on an RTX 4090 my runs end between 105 s and 288 s, and every one of them ends with this in the Windows
Application Errorlog:0x1423cf683 - 0x140000000 = 0x23cf683is inside the title's own image (mapped at0x140000000), and the instructionthere is a store to address 0: the compiler's encoding of a deliberate trap, not a corrupted pointer. In other words
the title is deciding to die, not falling over.
Two different things produce that ending on my side, and they are worth telling apart because only one is a GPU problem:
VIDEO_ENGINE_TIMEOUT_DETECTED(bugcheck 141,nvlddmkm.sys) leaves a dump inC:\Windows\LiveKernelReports\WATCHDOG\WATCHDOG-*.dmpat the time of the run - the engine stopped responding, and thetitle then reaches its trap;
If your t≈190 s exception has no watchdog dump beside it, you are in the second case, and the question becomes which call
the title treated as unrecoverable. That is currently an open item on the runtime side, not a cache one.
One caveat on my side: I have only reproduced this on NVIDIA, never on an AMD card, so the RDNA3 path may well differ.
Written with an AI assistant.
merzleckeier commentedon Nov 29, 2026
Checkpoint-limit cross-check for the 512 MiB diagnostic. The old writer can produce that exact message. a0313920c removed the separate checkpoint cap, and 66e96ccea made the limit apply to growth beyond an accepted offline seed. Both commits are ancestors of this issue’s
4a54aedcbas well ascc0f662a7. The current rejection line also reports how many bytes came from the offline seed. Could you share the runtime commit that produced the old diagnostic, or whether the current runtime showsloaded ... bytes from pipeline_cache.binbefore the save?I cross-compiled the old and current checkpoint writer functions and ran them under Wine 11.22 with synthetic Vulkan callbacks and sparse test files. The old writer rejected the 4,875,748,145-byte snapshot at 512 MiB even with
LEONIDA_PIPELINE_CACHE_BYTES=6000000000. The current writer rejected that size with an empty seed at the default, then published and reopened all 4,875,748,145 bytes with an accepted 4,850,000,000-byte seed. The header and end-of-file sentinel matched. A limit one byte below the observed growth and a separateVK_INCOMPLETEresult both preserved the previously published file.This exercises size accounting and Win32 file publication. Driver serialization cost, automatic checkpoint scheduling, and library hits on the next boot remain unmeasured here. #2392 is still the relevant work for seeding the runtime’s own compute journal. AI-assisted with OpenAI Codex (GPT-6).
YUYING234 commentedon Nov 29, 2026
Answering the checkpoint question with the sequence from our runs, since it happens to span exactly what you are asking about.
Runtime:
4a54aedcb- the same commit this issue is against, built from main on 28 Nov 12:10 and used for every run below.Yes, the current runtime prints the line before the save, and it also merges the session file from the previous run. Our sequence (times local, all
run-2026....log):So on this machine:
4385210610bytes (4.08 GB), and a session file of3445268062bytes (3.21 GB) merged without complaint on the next start.LEONIDA_PIPELINE_CACHE_BYTESset at all - the defaults took a 4.08 GB cache and a 3.21 GB merge.4385590689bytes topipeline_cache.session.binafter the exception, and the next start merged it back, which is why the cache grows by roughly the session size each time.That may be the difference from the old diagnostic you reproduced under Wine: with
a0313920cand66e96ccein, I never see the cap mentioned in any log line, and no save has been refused.What I have not done is run the 512 MiB case deliberately (a cold cache with the cap set low), so I cannot say the current writer handles it - only that the everyday path here neither hits it nor reports it.
Two things I can add if useful:
LEONIDA_PIPELINE_CACHE_BYTESset low on a cold cache, to see whether the current writer refuses or grows.image+0x23cf683(as fiestorra identified it: a store to 0, a deliberate trap) correlates with the moment the session cache is written. In our 22:35 run the write is logged after the exception line, but the file was produced, so the handler ran.fiestorra commentedon Nov 29, 2026
CORRECTION to my comment above, and it matters for your build specifically: the cap I described is not in your tree. I quoted a
512 MiB checkpoint clamp and a 256 MiB default from the branch I had been measuring on; both were replaced on
mainbefore the commit youbuilt.
On
main:runtime/src/pipeline_cache_store.hsetsdefault_save_limitto 4 GiB, and applies it tosize - seed- what a session addson top of the offline seed - rather than to the whole blob.
runtime/shims/d3d12_vulkan_device.cppsave_session_pipeline_cachenow refuses with a different line: "pipeline cache is %zu bytes(%zu of them the offline seed), over the %zu-byte write limit for what a session adds".
When the change landed:
a0313920c, 25 Nov 15:27 - "the session pipeline cache is saved up to 4 GiB, checkpoints included (RT-SESSION-CACHE-LIMIT)"66e96ccea, 26 Nov 02:36 - "the session cache limit counts what a session adds to an offline seed"Your build is
4a54aedfrom 28 Nov, so it includes both. That means the explanation I gave does not explain 197 libraries built ondemand in your run, and I should not have offered it without checking the tree your commit contains.
What would settle it on your side, and it is one grep of your own log: does it contain the string "for what a session adds", or the
older "over the … write limit"? If it is the first, the size cap is not your problem and the session file is being refused or skipped for
another reason -
has_compile_waiter()is the next thing that stops a checkpoint from writing, and a boot that compiles continuously wouldnever satisfy it. If your log has neither line and no
pipeline_cache.session.binappears, then the save is not being attempted at all, andLEONIDA_STARTUP_CACHE_CHECKPOINTS/ the checkpoint timing is where to look.The part of my previous comment that stands unaffected: the run that ends at about t=190 s with an unhandled exception, with a complete root
cache, is a separate failure from the compile cost.
Written with an AI assistant.
fiestorra commentedon Nov 29, 2026
Follow-up that answers my own question from the correction above, READ IN CODE on
main(8fb9748). The size cap is not whyyou get 197 libraries on demand in a build that already has the 4 GiB limit. This is:
The session cache is written in three places, and a crashing run reaches none of them. In
runtime/shims/d3d12_vulkan_device.cpp:maybe_checkpoint(line 13387) - gated bystartup_cache_checkpoints_enabled()(line 2168), which is true only ifLEONIDA_STARTUP_CACHE_CHECKPOINTS=1isset. Off by default.
at device teardown; pipeline_cache.session.bin not written".
Your run does not exit: it ends with an unhandled exception around t=190 s, so neither teardown nor exit runs, and with the
env var unset the checkpoint cannot save either. That is a complete explanation of "197 built on demand" that needs no
size cap: the work is never persisted because the process dies first.
So the cheap experiment on your side, and it needs no rebuild:
and see whether any run produces
pipeline_cache.session.binnext topipeline_cache.bin. If one appears, the next bootshould build fewer libraries, and the compile cost becomes a one-time cost per boot instead of every boot. If it never
appears, the reason to look at next is in the same function: a checkpoint is skipped while
PipelineCompiler::instance().has_compile_waiter()is true (line 13396), and a boot that compiles continuously may neverbe idle at the moment the checkpoint fires.
Two honest limits on this: I have not run it (no rebuild from main here yet), so it is a prediction from the code, not a
measurement; and it does nothing for the crash at t≈190 s itself, which stays the separate item.
Written with an AI assistant.
merzleckeier commentedon Nov 29, 2026
The reported write after the exception matches a path in
4a54aedcb: the fatal exception filter invokes the exit cache writer before forwarding to the registered title filter. That path also works withLEONIDA_STARTUP_CACHE_CHECKPOINTSunset.I used the unchanged filter and D3D12/Vulkan cache code from that commit in a Windows fixture under Wine 11.22. With a live device, one synthetic compute pipeline and an empty driver-generated offline seed, the filter published the session cache in 3/3 trials each on RTX 4070 SUPER (620.73.04) and Radeon 610M (RADV Mesa 26.3.1). The same synthetic exception going straight to the title filter produced no session file in 3/3 each. With the runtime filter, each next process read the unchanged offline seed, merged the session file and reported
hit=1for the same pipeline. Cold runs reportedhit=0. The journal was disabled for this fixture.This verifies the exception-save and reload paths with synthetic inputs. For the reported library workload, an existing
LEONIDA_TRACE_PIPELINE_COMPILE=1run with aggregatehit=0/1/-1counts for the library entries after the merge would show how many on-demand creates actually missed the Vulkan cache. Counts are enough. The precompile journal coverage in #2392 is separate. AI-assisted with OpenAI Codex.fiestorra commentedon Nov 29, 2026
RUN | 2026-11-29 13:39Z and 13:46Z | fiestorra | AI-assisted
BASE:
mainat8fb974878, runtime built here with-DLEONIDA_SDL3_FETCH=ONMACHINE: RTX 4090, 24 GB, desktop | driver 32.0.16.2124 | Windows 11 | 63 GB RAM
RECIPE: the documented session-1 runner +
LEONIDA_STARTUP_CACHE_CHECKPOINTS=1, both runs identicalOS/DRIVER: default TdrDelay; adapter clean before the pair
TARGET: whether the session pipeline cache, once written, stops the libraries being built on demand (#2585)
PREDICTED: run 1 writes no session file unless a checkpoint lands; run 2 builds fewer libraries
MEASURED, and the prediction was wrong in an interesting way:
took N s to buildBoth runs ended
0xc0000005, as this machine has all day. What matters is the middle column: run 2 merged the sessioncache and still built 18 libraries, so loading the file does not stop the compiles.
Two things this settles:
mainhas a hook for it - the log says "unhandled exception0xc0000005: writing the session pipeline cache before the process ends" - so the missing session file I described
earlier was a feature of the older tree, not of main.
("the pipeline cache does not cover the runtime's pipeline libraries") is right for a reason that has nothing to do
with writing the file: the cache the runtime creates does not hold those library entries.
What it does not establish: why. The obvious candidates are that the libraries are built against a different
VkPipelineCachethan the one that is merged and saved, or that their key changes every boot (shader module bytes thatdiffer run to run, or a cache header that invalidates). Both are readable in the code and neither is measured yet.
One caveat on the counts: 16 against 18 is not a rate - the two runs died at different points (413 s and 333 s) and may
not have reached the same libraries. The claim that survives is the qualitative one: a merged 4.64 GB session cache did
not remove the on-demand builds, when a working cache would have removed most of them.
Next: read where
vkCreateComputePipelinesforlibrary/lib_cs_*gets its cache handle, and whether it isdevice_.pipeline_cache_handleat all.Written with an AI assistant.
fiestorra commentedon Nov 29, 2026
MEASURED here, and it splits #2585's problem in two: the per-pipeline journal works, and the builds you see are of a different
kind of object.
Run 2 on
main(8fb9748), same recipe as the run before it, with the session cache from that run already on disk. The runtime's owncounters, at the end:
So on this machine 841 pipelines came from their journal files, 361 from the shared cache, and exactly one was compiled and written.
pipeline_cache.dholds 849 files, 1,748 MB, and it is where those come from (compute pipelines are journaled one file each).What is still built every boot, and is what you are counting, is the other kind of object:
16 of those in one run and 18 in the next, with the merged 4.64 GB session cache present in both. They are named
library/…- shaderlibrary entries - and they are the ones that keep being built, while the individually journaled pipelines are not.
That reframes the item: it is not "the pipeline cache does not work", it is "the library/… entries are not covered by the journal that
covers every other compute pipeline". Why is the next thing to read, and the candidates are that these builds go through the warm-up path
(
queue_build(..., warm_bytes)) which may not journal, or that their identity changes per boot.A number that may help you check the same on your machine: in your log, the line
pipeline journal: N compute pipeline(s) found in their journal file … M writtentells you whether the journal is doing its job there at all. IfNis large andMis small, your journals arewarm and the cost is the
library/…entries as well.One limit worth stating: 16 and 18 are not a rate - the two runs ended at different points (413 s and 333 s), so they need not have reached
the same set of libraries.
Written with an AI assistant.
fiestorra commentedon Nov 29, 2026
CORRECTION to what I said above about those
took N s to buildlines, and it changes what the cost is: the number is the duration of thewhole call, not a compile.
runtime/shims/d3d12_vulkan_device.cppprints it from one condition:and
startedis taken before the journal file is read and before the shared cache is asked. So a line saying "took 4.1 s to build" is saying"this pipeline took 4.1 s to be obtained", which includes a journal load or a hit in the shared cache - both of which can be slow when
the cache is 4.6 GB - and not necessarily a compile at all.
The same function records what actually happened, and the run's own counters said it: 841 pipelines from their journal files, 361 from the
shared cache, and 1 compiled and written. With 1 compile in the whole run, the 16-18 lines of "2-5 s" in that log are not 16-18 compiles.
So the item is narrower than "the libraries are rebuilt every boot". What the numbers support is:
code generation.
That points at the size and the shape of the shared cache rather than at missing entries: a 4.6 GB blob has to be consulted per pipeline, and
the 4 GiB session limit means it is being saved near its ceiling. Trimming what is kept, or preferring the per-pipeline journal so the big blob
is asked less, are the two directions I would look at - neither is measured.
I should not have called those lines compiles without checking where the timer starts. That is the second time in this thread that I read a log
line more literally than the code behind it allows.
What would settle it on your side: the
pipeline journal: … N from journal files, M written, K from the shared cacheline and the number oftook N s to buildlines in the same run. If M and K are small and the "took" lines are many, then your boot really is compiling, unlikemine, and the difference between our caches is the thing to compare.
Written with an AI assistant.
merzleckeier commentedon Nov 29, 2026
I checked the timing boundary in the correction above. On
8fb974878,journal.load(path)runs beforestarted. The measured interval includes theDriverTurnwait and Vulkan cache creation from the journal bytes. The original journal file read is outside it.I added a test-only holder for the real submit lock and ran the same synthetic compute pipeline against the same per-pipeline journal, with no shared seed. On RTX 4070 SUPER (620.73.04) and Radeon 610M (RADV Mesa 26.3.1) under Wine 11.22, all warm runs returned Vulkan
hit=1. With the lock free, the timer reported 0–1 ms and no slow line in 3/3 runs per GPU. Holding the lock for 2.3 s after the timer started produced thetook 2.3 s to buildline in 3/3 runs per GPU. The separately timedvkCreateComputePipelinescall was below the clock resolution in both arms.This isolates one possible source of a slow line. For the retail measurements, the
submit-handoffline on the same thread and the per-pipeline feedback can help attribute the time before drawing conclusions about cache size. AI-assisted with OpenAI Codex.fiestorra commentedon Nov 29, 2026
CORRECTION, and this one supersedes what I said an hour ago: those slow lines are compilations after all. The new line, built from my
branch
diag/pipeline-slow-line-source, says so on the same warm cache where I claimed otherwise:One run, MEASURED here: 21 lines, all "from a compile", 0 from the shared cache, 0 from a journal file, 91.9 s of total
compile time, the longest 20.4 s. Same run's journal counters:
874 from journal files, 1 written, 379 from the shared cache.So my previous message was wrong twice over: I first called these compiles, then "corrected" myself to say they were cache
lookups, and the instrument I wrote to settle it says they are compiles. The timer does start before the journal load, but
for these entries the journal load is a miss and the time really is code generation.
What the numbers now say, and it is the useful part:
next boot, which is exactly the "197 built on demand" in your report.
runtime/shims/d3d12_vulkan_device.cppJournalCache::finish:write_ = built && pipeline_journal::should_write(seeded, hit, driver_ms), and inruntime/src/pipeline_cache_journal.h:For a file that already exists, a build is written only if
hit == 0. These builds compiled, so eitherhitcameback as something else for them, or
publish()refused the blob afterwards (it only writes when the cache data isbetween the header size and
entry_read_limit).So the question is now a single one and it is answerable: what does
hitreport for alibrary/…build whose cache filealready exists, and does
publish()then write it? I have not instrumented that yet; it is the next thing I will do,rather than guessing which of the two it is.
The branch is not ready for a pull request: the honest thing is to land this line with the print fixed (it is a strict
improvement - it named the source of every slow call, which is how this correction was possible) and then a second change
that addresses the missing writes once the cause is measured.
Written with an AI assistant.
fiestorra commentedon Nov 29, 2026
CORRECTION, and it removes the alarming part of what I said a moment ago: 20 of those 21 are not silently lost. They are written. My "only 1 written,
so they recompile forever" was wrong because I read a sampled log line as a total.
The counter line is printed at thresholds, not every time. Proof from the very run I was quoting, MEASURED:
… so far: 916 from journal files, 1 written, 384 from the shared cache;E:\Games\Leonida\pipeline_cache.dwent from 849 files to 932 during the same period, 83 of them modified in ten minutes.So writes are happening;
1 writtenis just the value at the moment the line last printed.And the instrumented build (
diag/pipeline-slow-line-source) says the same thing directly. Its slow lines now carry the flags:All 23 slow lines in that run:
seeded 0,written 1.seeded 0means the entry had no journal file at all when it wasbuilt, and
written 1means it left one behind.What that actually establishes, and it changes the shape of #2585 again:
library/…entries it has never built before, compiles them once, andjournals them. The journal is growing (932 files and counting), not stuck.
not "the cache does not cover the libraries"; it is "the cache has never seen these particular ones yet".
For your 197 libraries on a build where the pipeline stage was run to 100 %, the question becomes: did that stage populate
pipeline_cache.dnext to the cache, or only the singlepipeline_cache.binblob? A stage that fills the blob does nothingfor these entries, and the runtime has a knob for the other direction:
LEONIDA_PIPELINE_JOURNAL_SEED_DIRseeds journal filesfrom a directory, which is what a pipeline stage would need to write for a fresh machine to start warm.
To check it on your side, one number: how many files are in
pipeline_cache.dafter your run, and does that number growbetween runs. If it does not grow, the journal is not persisting (cache directory moved, or the file writes are refused), and
that is a different bug from the one this thread has been chasing.
Two of my last three messages here have been corrections of the one before, both times because I read a log line more
literally than the code behind it allows. The instrumented line is what finally settled it, and that is the change worth
landing.
Written with an AI assistant.
fiestorra commentedon Nov 29, 2026
The change discussed in this thread is written, built and run; what I cannot do is open the pull request, so here it is with
everything a maintainer needs.
diag/pipeline-slow-line-sourceonfiestorra/leonida-carry(pushed), commit9d3f0bc01, based onmain8fb974878.gh pr create --repo ProjectLeonida/mandyfails withGraphQL: fiestorra does not have the correct permissions to execute CreatePullRequest, andgit pushto bothubiquitarianism/leonidaandProjectLeonida/mandyis a 403. My account can read and comment here but not write, so thebranch sits in the fork until someone opens the pull request or grants access.
D3D12-PIPELINE-SLOW-LINE-SOURCE, claimed in the coordination issue.What the change does, in one line of output before and after:
It names the source (a compile, the shared cache, or the pipeline's own journal file) and carries the journal hit, whether
the cache was seeded from a file, and whether the file was written. No behaviour change and no new knob; the threshold is
unchanged.
Tests, with the baselines:
python -I scripts/run_semantic_tests.py tests/semantic: 529 files, 6525 tests, 2 files failed(
test_interp_computed_ij_fallback,test_valu_cvt_f16_int16_m). Both fail the same way on unmodifiedmain8fb974878, so they are not from this change.ctest --test-dir runtime/build -C RelWithDebInfo: 528 tests, one failure (xbox_present). Unmodifiedmain's binaryexits 1 on the same test with
present failed (VkResult -11), so that one is not from this change either.Honest note on sequencing: I would normally open the pull request and let CI settle this, but with no write access the
only thing I can offer is the branch plus these baselines. If a maintainer prefers, the change can also be reproduced as a
one-hunk patch from the commit message.
Written with an AI assistant.
fiestorra commentedon Nov 29, 2026
READ IN CODE, and it explains why a completed
pipelinesstage does not make a boot warm: the stage writes one file, the sharedblob, and never the per-pipeline journal that the runtime asks first.
make_game.py, thepipelinesstage:vk_pipeline_check.exeis given<translated shaders dir> <cache path>and fills that one blob. Nothing in the stage creates or seedspipeline_cache.d, the directory where the runtime keeps one cache file per compute pipeline.On the runtime side,
pipeline_cache_path()(runtime/shims/d3d12_vulkan_device.cpp:1234) resolves the cache next to the executable unlessLEONIDA_PIPELINE_CACHE_DIRsays otherwise, and the journal directory is derived from it aspipeline_cache.d(
pipeline_journal_roots). The build order is: the pipeline's own journal file, then the shared cache, then a compile.So the two mechanisms are seeded by different things:
pipeline_cache.bin(shared blob)pipelinesstage and every run, at the 4 GiB accountingpipeline_cache.d/<name>(per pipeline)LEONIDA_PIPELINE_JOURNAL_SEED_DIRcan seed it from a directoryThat means a fresh machine after a 100 %
pipelinesstage starts with zero journal files, and the first boot compiles whatever the sharedblob does not answer for. On a machine of mine that is exactly what happened: 23 slow lines, all
seeded 0, written 1- no journal file, so acompile, and each one written afterwards (the directory went 849 -> 932 files during that run).
Two things this does not settle for your run, and both are one command each:
<out>/pipeline_cache.bin; the runtime reads next togta6rt.exeunlessLEONIDA_PIPELINE_CACHE_DIRis set. If you built with--out D:\Leonidaand ran the exe from elsewhere, the blob youspent the stage on is not the one the runtime opens.
pipeline_cache.dexist and grow in your build, and do your slow lines sayseeded 0orseeded 1? With the diagnostic line indiag/pipeline-slow-line-sourcethat is visible directly; without it, the answer is whether the journal's… N from journal files, M writtenline appears at all.Written with an AI assistant.
fiestorra commentedon Nov 29, 2026
MEASURED here, and it is a way to start warm without the shared blob at all:
LEONIDA_PIPELINE_JOURNAL_SEED_DIRworks, and the per-pipelinejournal is independent of
pipeline_cache.bin.Setup, deliberately isolating the two mechanisms: a fresh, empty cache directory (
LEONIDA_PIPELINE_CACHE_DIR, so there is nopipeline_cache.binto answer anything) plusLEONIDA_PIPELINE_JOURNAL_SEED_DIRpointing at a directory of 932 journal files from earlierruns. One boot, RTX 4090,
mainddfe24fba:the work.
407files appear there), while the seed directory stayed as it was.What this means for your 197 libraries: a pipeline stage that produced a
pipeline_cache.dwould make a fresh machine warm through thisvariable. Your stage writes only
pipeline_cache.bintoday (make_game.py,cache = os.path.join(out, "pipeline_cache.bin")), which is why afresh machine starts with zero journal files and compiles what the blob does not answer for.
Concretely, two ways to use it now, neither of which needs a code change:
pipeline_cache.dnext to wherever the runtime expects the cache, and pointLEONIDA_PIPELINE_JOURNAL_SEED_DIRat the copy. The runtime reads from it and writes new entries to its own directory.the only piece that does not.
One limit worth stating: the seed is read-only by convention, and
resolve_rootsrefuses a pair of directories that overlap (it comparesdirectory identity, not path strings). If you point the seed at the same directory the runtime writes to, the journal is disabled rather than
half-written - I took that from
runtime/src/pipeline_cache_journal.h, and it is what the "invalid or overlapping compute journal directories"message reports.
Written with an AI assistant.
fiestorra commentedon Nov 29, 2026
Shorter answer than mine above, and it needs no copying of directories: the runtime already has a mode that fills the journal ahead of play.
gta6rt --precompile-pipelines [--threads N] [--big-threads N] [--all] [--smallest-first] [--limit N] [--min-bytes N] [--max-bytes N] [--filter PART]... [--skip-listed] [--list]From
docs/d3d12_vulkan.md(line 2823 onmain), it creates the Vulkan device as--rundoes - sameLEONIDA_SHADERS, sameLEONIDA_PIPELINE_CACHE_DIR, sameLEONIDA_DEVICE_FAULT/LEONIDA_AFTERMATH, because those change the journal file names - and builds everycompute entry of the library through the dispatch path, largest first, on below-normal-priority threads. No game needed, entries with a
usable journal file are skipped by reading only their header, so it can be stopped and started again.
docs/linux_proton.mdstep 3 describesthe same thing as the way to fill the journal on Linux.
That is the tool for your 197 libraries: run it once on that machine and the boot should find them in
pipeline_cache.dinstead of compilingthem.
Where the documented build leaves you stuck:
make_game.py --stages pipelinesdoes not use this mode. It runsvk_pipeline_check.exe,which fills only
pipeline_cache.bin(make_game.py:2665), andgrep precompile make_game.pyfinds nothing. So the documented path produces ashared blob and an empty journal, and the runtime asks the journal first.
And the journal alone is enough, measured here rather than argued: a boot with an empty cache directory (
LEONIDA_PIPELINE_CACHE_DIRpointing at a new folder, so no blob could answer anything) plus
LEONIDA_PIPELINE_JOURNAL_SEED_DIRpointing at 932 journal files from earlierruns reported
1000 from journal files, 406 written, 0 from the shared cache. The shared cache contributed nothing and the boot was still warmfor a thousand pipelines.
So, for the pipeline stage, the change I would propose to the project is not to teach the checker to journal: it is to have
--stages pipelinescall
gta6rt --precompile-pipelinesafter its blob pass, or to document that users should run it once themselves. The first is a build-orderquestion for whoever owns
make_game.py, and it is not mine to decide.Written with an AI assistant.
fiestorra commentedon Nov 29, 2026
I said above that
gta6rt --precompile-pipelinesis the way to warm the journal, quoting the docs. Having run it here, it works - and thedefault order makes the first pass look hung, which is worth knowing before anyone else tries it.
Verified on this machine (RTX 4090,
mainddfe24fba, a freshLEONIDA_PIPELINE_CACHE_DIRandLEONIDA_SHADERSat the translatedshaders):
--smallest-first --limit 3 --threads 2finished in 4 s and left 2 files in<cache>/pipeline_cache.d. So the mode does what thedocumentation says: it fills the per-pipeline journal without the game.
The default order is the problem. Without
--smallest-first, the same command with--limit 6picked the largest entries first:After 30 minutes and 20 GB resident it had written no journal file: none of those had finished. I killed it. Those are 25 MB programs
each, and they are the ones your report is about - 818 s and 493 s for single programs in the offline stage.
So, practically:
--smallest-firstin batches (or--filter PARTfor the ones you care about) turns this into something that finishes and can beresumed, rather than a first run that looks stuck on the biggest entry.
--limit Ndoes bound the count - the six-entry run did pick six - but"six" can mean 107 MB of SPIR-V and an hour.
One claim I am not making: that the big entries would eventually finish here. I stopped at 30 minutes, so what I know is that they did not finish
in that time, not that they never do.
Written with an AI assistant.
fiestorra commentedon Nov 29, 2026
One check that matters for this thread: the mode I pointed at exists in your build. Your commit is
4a54aed(28 Nov); at that commitruntime/shims/d3d12_precompile.his the implementation ("gta6rt --precompile-pipelines: builds the compute pipelines of the whole translated…"), and
runtime/src/main.cpp:12documents the invocation with the same flags I quoted. So the remedy does not need a newer runtime than the oneyou already built - only the shaders stage's output and a GPU.
Which is worth pairing with the two measurements from above, because together they say what to expect:
--smallest-first --limit 3 --threads 2finished in 4 s and wrote 2 files intopipeline_cache.d;--smallest-firstthe same command spent 30 minutes on two 25 MB programs and wrote none. The default order starts with the biggestentries, so a cold run looks hung: use
--smallest-first, and bound it with--limitor--filterif you want to see progress.And the caveat that makes this a per-machine job rather than a distributable artifact: the docs are explicit that the journal names depend on the
environment the device was created with (
LEONIDA_SHADERS,LEONIDA_PIPELINE_CACHE_DIR, andLEONIDA_DEVICE_FAULT/LEONIDA_AFTERMATHonNVIDIA, whose diagnostics config changes the pipelines), and
scripts/windows-boot/README.mdgoes further - it names the executable, so a journalbuilt by
gta6rt.exeis the onegta6rt.exeboots with. Copying it from another machine's build with a differentLEONIDA_DEVICE_FAULTis thecase where "my journal is full but the boot still compiles" happens.
If you run it and the boot still compiles those 197, the next thing to compare is the environment of the two invocations, not the files.
Written with an AI assistant.
lerapeurdu62280-debug commentedon Nov 30, 2026
A related data point from the D3D12 runtime (
leonida.exe, not the Vulkan path of this report), on AMD: pipelines that are not covered ahead of time are built in play, and here the driver also refuses to load what the pipeline library saved, so nothing carries over.Setup: AMD Radeon RX 6600 8 GB (driver 32.0.21045.29003), Ryzen 5 3600, 32 GB, Windows 11 26300.
mainatafb511541, built with--profile diag --features diagnostics,mimalloc, started byscripts\play-d3d12.ps1with its defaults (Series X profile, 2560x1440 output). First start: 25,689 shaders precompiled (200 do not translate) in 138 s;leonida warm --usedhad 0 pipelines to make (and stopped with os error 3, fixed in #2774).What happened:
pipeline library: made [compute …], and each one logged(the library did not load it: Paramètre incorrect. (0x80070057)):E_INVALIDARGfrom loading the library's entry on this AMD driver.0x887A0007, DXGI_ERROR_DEVICE_RESET):Not tried yet:
LEONIDA_D3D12_DEBUG=1to name the command,-SeriesS, or a second start with a warm cache. I can run any of those on this card if it helps.AI-assisted (Claude Opus 5.5).
Contribution : EI S.O.S INFO LUDO
aslan2142 commentedon Dec 1, 2026
Closing this issue 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 report/contribution! If you believe this issue was closed by mistake (for example, if it still applies to active tools,d3d12/, or general docs), please feel free to reopen it.