mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-15 19:19:58 -04:00
Keep every pipeline when tex_vram_pressure is 0, as the textures read it.
nx2navi.ini.example says tex_vram_pressure = 0 means the textures never give way for video memory, and vk_texture.c sweep_pressure reads 0 as off, but pressure_release mapped 0 to the default 80 %, so the pipelines no draw had used were still given back over 80 % of the budget. pressure_release now leaves them for the run at 0 and logs so; values outside 0..100 still fall back to 80. The pipe_release paragraph of nx2navi.ini.example says that tex_vram_pressure = 0 turns it off too. No cfg.c row changes. Not reproduced before the change; nothing changes at the default (80). vk_pipeline.c compiles with no new warnings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -430,7 +430,7 @@
|
||||
# While the video memory in use is over tex_vram_pressure percent of the budget, the pipelines the game built ahead
|
||||
# of play and no draw has used yet are given back, a few hundred every 5 seconds: on a card short of video memory they
|
||||
# are what costs least to lose, and a draw that needs one later builds it again from the pipeline cache. 0: every
|
||||
# pipeline stays for the run, as before 0.10. Read at start.
|
||||
# pipeline stays for the run, as before 0.10; tex_vram_pressure = 0 turns this off too. Read at start.
|
||||
# pipe_release = 1
|
||||
# Low-end GPU mode (experimental; also in the settings menu's Game tab). For older graphics cards, and ones short of
|
||||
# video memory: 1 turns on the settings written for them and measured on a Radeon RX 580, for every key below that
|
||||
|
||||
@@ -5079,7 +5079,8 @@ static void fast_retire(Pipe *p) {
|
||||
// The use counts the free space inside the allocator's blocks as free, as the texture evictions do (vk_texture.c
|
||||
// sweep_pressure): the driver's figure (vk_mem_vram) counts it as used, so with free blocks it could stay over the line
|
||||
// while pipelines went, and every pass would give back another batch until no unused pipeline was left.
|
||||
// NX2NAVI_PIPE_RELEASE=0 keeps every pipeline for the run, as before 0.10.0.
|
||||
// NX2NAVI_PIPE_RELEASE=0 keeps every pipeline for the run, as before 0.10.0, and so does NX2NAVI_TEX_VRAM_PRESSURE=0,
|
||||
// which keeps the textures from giving way for video memory.
|
||||
#define RELEASE_EVERY_MS 5000
|
||||
#define RELEASE_BATCH 256
|
||||
#define RELEASE_DRAIN 64 // destroyed per autosave tick (500 ms) at most: faster than RELEASE_BATCH per RELEASE_EVERY_MS
|
||||
@@ -5118,8 +5119,13 @@ static void pressure_release(uint64_t now) {
|
||||
if (on < 0) {
|
||||
on = cfg_bool("NX2NAVI_PIPE_RELEASE");
|
||||
pct = cfg_int("NX2NAVI_TEX_VRAM_PRESSURE");
|
||||
if (pct <= 0 || pct > 100) pct = 80;
|
||||
if (pct < 0 || pct > 100) pct = 80;
|
||||
if (!on) rt_log("vk_pipeline: every pipeline stays for the run, also while video memory is short (NX2NAVI_PIPE_RELEASE=0)");
|
||||
else if (!pct) { // 0 turns the textures' giving way off (vk_texture.c sweep_pressure): the pipelines' too
|
||||
on = 0;
|
||||
rt_log("vk_pipeline: every pipeline stays for the run, also while video memory is short "
|
||||
"(NX2NAVI_TEX_VRAM_PRESSURE=0)");
|
||||
}
|
||||
}
|
||||
if (!on || now - last < RELEASE_EVERY_MS) return;
|
||||
last = now;
|
||||
|
||||
Reference in New Issue
Block a user