Say where the boot's list of compute shaders comes from: mostly the shader preparation, not play.

An installed copy's warm list has 42,344 variants, 42,142 of them from shader-prepared.bin, and its 4,066 compute shaders are what the boot kept pipelines for. The comments and the settings text said the list grew with the play history; a copy with prepared shaders held the 2.3 GiB from its first boot. Comments, docs and the ini text only.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
(cherry picked from commit ea984fe05b995c5dad1e0f49c5f44de9ee8f19b2)
This commit is contained in:
chrg6
2026-11-10 03:29:15 -05:00
parent 1567ff8df4
commit 1b9016896a
4 changed files with 16 additions and 14 deletions

View File

@@ -2685,9 +2685,9 @@ static void outside_watch(uint64_t frame) {
// One line per boot stage (vk_pipeline.c calls it after the pipeline cache load, the shader prewarm, the recorded
// pipelines and the compute pipeline prebuild): the device-local memory in use, the part of it VMA did not allocate
// (outside_watch's "outside VMA": pipelines and the driver's own, before the swapchain and the upscaler exist), and the
// process's commit and working set. Subtracting two lines gives what a stage left behind: with a long play history the
// boot's compute pipelines alone held 2.3 GiB of device memory on an RTX 5090 (4,066 pipelines kept, 95 of them
// dispatched before the first village), which is what this line was added to place.
// process's commit and working set. Subtracting two lines gives what a stage left behind: on an installed copy with
// its prepared shader list the boot's compute pipelines alone held 2.3 GiB of device memory on an RTX 5090 (4,066
// pipelines kept, 95 of them dispatched before the first village), which is what this line was added to place.
void vk_mem_stage_log(const char *stage) {
VkCtx *c = vk_ctx();
double proc, used, limit;

View File

@@ -4295,11 +4295,12 @@ static int cs_flight_remove(const GfxShader *cs) { // 1 when a dispatch waited
}
// ---- compute pipelines the boot keeps (compute-used.bin next to pipeline-keys.bin; NX2NAVI_COMPUTE_KEEP)
// The boot prebuild (lb_compute) used to build the pipeline of every compute shader play ever recorded and keep all of
// them for the process. A pipeline that exists holds driver memory whether or not anything dispatches it, and the list
// only grows with the play history: on an RTX 5090 (NVIDIA 621.01) a history of 4,066 compute shaders held 2.3 GiB of
// device memory and a matching share of the process's commit from the title screen on, while a boot into the first
// village dispatched 95 of them. That is memory an 8 to 12 GB card needs for textures.
// The boot prebuild (lb_compute) used to build the pipeline of every compute shader of the warm list (the ones play
// recorded and the prepared ones, shader-prepared.bin) and keep all of them for the process. A pipeline that exists
// holds driver memory whether or not anything dispatches it: on an RTX 5090 (NVIDIA 621.01) the 4,066 compute shaders
// of an installed copy's list (42,344 variants, 42,142 of them prepared) held 2.3 GiB of device memory and a matching
// share of the process's commit from the title screen on, while a boot into the first village dispatched 95 of them.
// That is memory an 8 to 12 GB card needs for textures, and a copy with prepared shaders pays it from its first boot.
// So the boot keeps only the pipelines of the NX2NAVI_COMPUTE_KEEP (default 512) compute shaders dispatched most
// recently, and builds every other one into the pipeline cache and destroys it at once (lb_compute keep 0): the cache
// then holds it, so its first dispatch creates it without compiling, and no pipeline of an unused shader stays. On