Do the whole warm on the boot screen at the first start after a driver change.

A start that finds the pipeline cache written by another device or driver has nothing built, and everything was
compiled beside the game: an 8-core integrated GPU drew fewer than 600 frames in its first 11 minutes. Such a start
now waits on the "Preparing shaders" screen, with counts, for every recorded pipeline, for the compute pipelines on
every core at normal priority, and, when a sample says the driver's own cache lacks the prepared stage libraries, for
all of them on every core. The memory gate still holds for the builds, and the library builds write the preparation's
journal while the start waits, so a variant the driver's compiler dies on is skipped from the next start on.

boot-warm-owed.txt beside the caches names the GPU and driver: a start closed during the warm is followed by one that
goes on with it, three at most, and "done" keeps later starts ordinary while the cache file still carries the earlier
driver's header. When the boot stops waiting (prewarm_wait_ms, or a minute without progress) the builders step down
to the background's thread counts and idle priority. prewarm_full = 0 turns the warm off.

With nothing in the driver's cache the probe took 425 s on an RTX 5090 with 16 CPU threads: 87 s for 5,775 recorded
pipelines, 19 s for 4,075 compute pipelines and 317 s for 42,231 prepared variants.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-12 20:03:12 -05:00
parent 016c90fafb
commit cd0b1a387d
14 changed files with 443 additions and 59 deletions

View File

@@ -114,8 +114,14 @@ keeps per-core data without locks and relies on that, so the host models it (`ru
`menu_boot_frame`). With the graphics pipeline library the boot builds recorded pipelines in record order for at
most 20 s after the shaders are ready and leaves the rest to the pipeline workers below normal priority; a draw
that meets one before it is built gets a fast-linked pipeline (`vk_pipeline.c` `PREWARM_PIPE_MS`).
`NX2NAVI_PREWARM_FULL=1`, and drivers without the library, wait for every pipeline. `NX2NAVI_PREWARM_WAIT_MS` caps
the whole wait, after which the rest finishes in the background.
`NX2NAVI_PREWARM_FULL=1`, and drivers without the library, wait for every pipeline. A start that finds the
pipeline cache written by another GPU or driver waits for the whole warm on that screen, since nothing is built
then and all of it would compile beside the game: every recorded pipeline, the compute pipelines, and the
prepared shader variants built into the driver's own cache when a sample says it lacks them (`vk_pipeline.c`
`bf_decide`, `bf_wait`). `boot-warm-owed.txt` next to the caches lets a start go on with a warm that an earlier
one began and did not end, three starts at most, and says when the warm for a GPU and driver is done
(`runtime/boot_warm.h`); `NX2NAVI_PREWARM_FULL=0` turns it off.
`NX2NAVI_PREWARM_WAIT_MS` caps the whole wait, after which the rest finishes in the background.
- Translator updates: every cache key names the translator, so a new one has no translations. The cache carries the
previous translator's (`NX2NAVI_SHADER_CARRY`, `runtime/gfx_shader.c` "Carry"): `shader-cache/identities.txt`
lists the translators it holds translations of, and a shader the new translator has not translated yet uses the