mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-19 06:29:58 -04:00
Keep only the compute pipelines of recently dispatched shaders from the boot, and build the others into the pipeline cache without keeping them.
The boot prebuild built the pipeline of every compute shader play ever recorded and kept all of them for the process. A pipeline that exists holds driver memory whether or not anything dispatches it: with a history of 4,066 compute shaders they held 2.3 GiB of device memory, and its share of the process's commit, from the title screen on (RTX 5090, NVIDIA 621.01), while a boot into the first village dispatched 95 of them.
The boot now keeps the pipelines of the 512 compute shaders dispatched most recently (compute-used.bin next to pipeline-keys.bin records which run last dispatched each; the setting is compute_keep, with "all" for the earlier behaviour). Every other one is still built at boot, so that the pipeline cache holds it after an update or a driver update, but destroyed at once, and created from the cache at its first dispatch. A dispatch that comes while such a build runs gets that build's pipeline.
Each boot stage now logs the device memory and the process commit it leaves ("mem: boot stage"), and the log says what the first dispatches cost. nx2navi.exe --probe-prewarm runs these stages without the game from the caches next to the executable and times first dispatches of pipelines the boot did not keep: 256 of them took 0.19 ms on average and 3 ms at most, all read from the pipeline cache file, and 372 pipelines built and destroyed at boot left the device memory where it was.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
(cherry picked from commit 16a796d623686bca5304eaf1b29981247453a413)
This commit is contained in:
@@ -104,6 +104,11 @@
|
||||
# threads mostly wait on the graphics driver's lock: 16 on NVIDIA spent about 8 cores spinning in the driver.
|
||||
# lib_prebuild = 1
|
||||
# lib_prebuild_threads = 2
|
||||
# How many compute pipelines the start builds and keeps: those of the compute shaders the game used most recently.
|
||||
# Every other known one is built into the pipeline cache and released again, and made from the cache when the game
|
||||
# first uses it (well under a millisecond). all: the start keeps every compute shader the game ever used, as versions up
|
||||
# to 0.6.1 did; with a long play history that held more than 2 GB of video memory. 0: none are kept.
|
||||
# compute_keep = 512
|
||||
# 1: very large compute shaders that no cache holds are built on one background thread after the start. 0: each is
|
||||
# built when the game first uses it, which can hold that frame for a second or two.
|
||||
# lib_prebuild_big_bg = 1
|
||||
|
||||
Reference in New Issue
Block a user