mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 01:49:59 -04:00
Keep the SPIR-V of shaders nobody read for 30 seconds compressed in memory.
The shader memory cache held 777 MiB of SPIR-V for 7115 shaders for the whole session. A background thread now compresses the SPIR-V of each shader no reader pinned for shader_compress_idle_s seconds (zstd level 1, 26% of the bytes on the test install's 44,151 modules) and frees the plain copy; readers pin it through gfx_shader_spirv_pin and get it decoded back. What the drawing thread compares at pipeline misses and draws, the module's FNV-1a and its Binding decorations, is kept with the shader, so module_binding_missing, the water corrections and the DLSS, crumbs and skip lists decode nothing. A compute pipeline created at a dispatch and a mesh shader's first pipeline key still decode on that thread, and the memory report counts those decodes apart, with the SPIR-V as held against uncompressed and the shaders held compressed. shader_compress = 0 keeps it plain. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -298,6 +298,12 @@
|
||||
# the new translator cannot translate keeps its old translation. 0: shaders the new translator has not translated yet
|
||||
# are translated before they are used (at start or when the game first draws them), as earlier versions did.
|
||||
# shader_carry = 1
|
||||
# 1 keeps a shader's translation (its SPIR-V) compressed in memory once no pipeline was made of it for
|
||||
# shader_compress_idle_s seconds (1 to 3600), and decompresses it when one is made again (about 0.06 ms for most
|
||||
# shaders): about 570 MiB less memory with 7,000 shaders in memory, the picture unchanged. 0 keeps every translation
|
||||
# as it is.
|
||||
# shader_compress = 1
|
||||
# shader_compress_idle_s = 30
|
||||
# Vulkan graphics pipeline library, 0 or 1. Default: on, except with AMD's Windows driver for RX 6000 and older cards
|
||||
# (RX 400 to RX 6000), where the game ended at every enemy killed with it on. There it is off: a pipeline needed for
|
||||
# the first time is built whole while its draw is left out for some frames, and the start waits until every pipeline
|
||||
|
||||
Reference in New Issue
Block a user