mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-20 16:49:58 -04:00
Remove the Video memory use row; its low behaviour is the only one now.
Released textures go once they have gone unused for the hold, and what a switched-off upscaler or SMAA held is freed, with no setting to keep them. A vram_use line left in a settings file is known and read by nothing. Memory use is to be decided by the card's and the system's budget instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -279,8 +279,8 @@ keeps per-core data without locks and relies on that, so the host models it (`ru
|
|||||||
for content only the GPU made (`vk_texture.c` `drop_aged`, `vk_tex_release.h`, `tex_released_hold`). The size bound
|
for content only the GPU made (`vk_texture.c` `drop_aged`, `vk_tex_release.h`, `tex_released_hold`). The size bound
|
||||||
(a quarter of the video memory budget) stays as the safety net for a burst of area changes, and young textures may
|
(a quarter of the video memory budget) stays as the safety net for a burst of area changes, and young textures may
|
||||||
pass it, up to twice it, while the card and the system's commit have room. Times are wall seconds from a clock of
|
pass it, up to twice it, while the card and the system's commit have room. Times are wall seconds from a clock of
|
||||||
the presents, not present counts. `vram_use = high` (`cfg.c` `vram_use_value`) turns the hold off and keeps what a
|
the presents, not present counts. What a switched-off upscaler or SMAA held is freed after it has gone unused for a
|
||||||
switched-off upscaler or SMAA holds; the default, low, frees both.
|
while (`vk_dlaa.c` `idle_release`, `vk_fsr.c` `idle_note`, `vk_aa.c` `work_idle`).
|
||||||
- Allocation: Vulkan Memory Allocator. Debugging: Vulkan validation layers, per-pass frame dumps (`NX2NAVI_DUMP`,
|
- Allocation: Vulkan Memory Allocator. Debugging: Vulkan validation layers, per-pass frame dumps (`NX2NAVI_DUMP`,
|
||||||
`vk_dump.c`), a sampling profiler (`NX2NAVI_PROFILE`, `tools/prof_report.py`) and a flight recorder
|
`vk_dump.c`), a sampling profiler (`NX2NAVI_PROFILE`, `tools/prof_report.py`) and a flight recorder
|
||||||
(`NX2NAVI_FLIGHT`). RenderDoc cannot capture, because it hides `VK_EXT_external_memory_host` from the application.
|
(`NX2NAVI_FLIGHT`). RenderDoc cannot capture, because it hides `VK_EXT_external_memory_host` from the application.
|
||||||
|
|||||||
@@ -368,7 +368,7 @@
|
|||||||
# left. In play the game took released textures back within a minute or not at all; one taken back after its drop is
|
# left. In play the game took released textures back within a minute or not at all; one taken back after its drop is
|
||||||
# made again and shows its stand-in for a frame. A texture whose content only the GPU made waits twice as long, and one
|
# made again and shows its stand-in for a frame. A texture whose content only the GPU made waits twice as long, and one
|
||||||
# the GPU drew into since its last copy back to game memory stays. 0: released textures stay up to tex_released_mb for
|
# the GPU drew into since its last copy back to game memory stays. 0: released textures stay up to tex_released_mb for
|
||||||
# the whole session (as before 0.10). Default: 180; vram_use = high sets 0. Read at start.
|
# the whole session (as before 0.10). Default: 180. Read at start.
|
||||||
# tex_released_hold = 180
|
# tex_released_hold = 180
|
||||||
# Megabytes the released textures may hold (0: no bound). Past it the oldest go even when young; while tex_released_hold
|
# Megabytes the released textures may hold (0: no bound). Past it the oldest go even when young; while tex_released_hold
|
||||||
# is on, young ones may stay past it, up to twice it, as long as video memory and the system's commit have room.
|
# is on, young ones may stay past it, up to twice it, as long as video memory and the system's commit have room.
|
||||||
@@ -589,15 +589,6 @@
|
|||||||
# cpu or astc_bc = 0) and the budget is under 20480 MiB, auto goes one step lower, as they take four times the memory.
|
# cpu or astc_bc = 0) and the budget is under 20480 MiB, auto goes one step lower, as they take four times the memory.
|
||||||
# The log says what was picked ("texture detail:"). Read at start.
|
# The log says what was picked ("texture detail:"). Read at start.
|
||||||
# texture_detail = auto
|
# texture_detail = auto
|
||||||
# Video memory use (the Screen tab's row): low or high. low, the default, lets go of released textures once nothing has
|
|
||||||
# used them for tex_released_hold (180 s), and frees what DLSS, frame generation's HUD-less picture, FSR 1 and SMAA
|
|
||||||
# held once they have been switched off for a while (about 0.9 GiB with DLSS off at 5120x2142). high keeps both for the
|
|
||||||
# whole session (tex_released_hold = 0: released textures up to tex_released_mb), so switching those features on again
|
|
||||||
# makes nothing. balanced, the default before 0.10, means low. The low of the 0.10 previews traded memory for work
|
|
||||||
# done again; its values are keys of their own: tex_released_mb = 1024, tex_vram_pressure = 70 and pipe_seed_boot = 0
|
|
||||||
# (0.3-0.6 GiB of video memory and 2-4 GB of commit less, but a first visit to an area misses objects for a frame
|
|
||||||
# while their pipelines are made). Read at start.
|
|
||||||
# vram_use = low
|
|
||||||
# Sun shadow map size: game (the game's own, which changes with the view and drops to about 400 near the ground, so
|
# Sun shadow map size: game (the game's own, which changes with the view and drops to about 400 near the ground, so
|
||||||
# leaf shadows look blocky and jump) or a fixed 256, 512, 768, 1024, 1536 or 2048. Above 960 the texture heap grows with
|
# leaf shadows look blocky and jump) or a fixed 256, 512, 768, 1024, 1536 or 2048. Above 960 the texture heap grows with
|
||||||
# it. 256 is coarser than the game's own and is for integrated GPUs short of memory bandwidth. Read at start.
|
# it. 256 is coarser than the game's own and is for integrated GPUs short of memory bandwidth. Read at start.
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ static const char *const known[] = {
|
|||||||
"UPLOAD_BATCH_MB", "VRAM_HEAP_LIMIT", "VRAM_RESERVE_MB", "TEX_CLOBBER", "LOW_END_GPU",
|
"UPLOAD_BATCH_MB", "VRAM_HEAP_LIMIT", "VRAM_RESERVE_MB", "TEX_CLOBBER", "LOW_END_GPU",
|
||||||
"ZSTD_CHECK", "ZSTD_NATIVE",
|
"ZSTD_CHECK", "ZSTD_NATIVE",
|
||||||
"BIND_REUSE", "DYN_DELTA", "STG_ARENA", "SUBMIT_BATCH", "SUBMIT_THREAD", "ASTC_GPU_DESWIZZLE", "ASTC_SCRATCH_KEEP", "ASTC_ARENA", "ASTC_BC1",
|
"BIND_REUSE", "DYN_DELTA", "STG_ARENA", "SUBMIT_BATCH", "SUBMIT_THREAD", "ASTC_GPU_DESWIZZLE", "ASTC_SCRATCH_KEEP", "ASTC_ARENA", "ASTC_BC1",
|
||||||
"TEXUP_LOG_MS", "DYN_RES", "DYN_RES_TARGET", "DYN_RES_STEP", "TEXTURE_DETAIL", "VRAM_USE",
|
"TEXUP_LOG_MS", "DYN_RES", "DYN_RES_TARGET", "DYN_RES_STEP", "TEXTURE_DETAIL", "VRAM_USE", // vram_use: the removed Video memory use row, read by nothing
|
||||||
"RECORDER_CORE", "RECORDER_PRIO", "REPLAY_TIME", "LOCK_TIME", "POOL_CREATE_BUDGET", "POOL_CREATE_MS", "POOL_FINI_IDLE", "POOL_LOAD_BACKLOG", "POOL_LOAD_MS",
|
"RECORDER_CORE", "RECORDER_PRIO", "REPLAY_TIME", "LOCK_TIME", "POOL_CREATE_BUDGET", "POOL_CREATE_MS", "POOL_FINI_IDLE", "POOL_LOAD_BACKLOG", "POOL_LOAD_MS",
|
||||||
"VMA_BLOCK_MB", "SYNC_WAKE_ALL", "LOG_ASYNC", "DEVICE_LOST_AT", "STAGING_FAIL_AT", "VRAM_BALLAST_MB",
|
"VMA_BLOCK_MB", "SYNC_WAKE_ALL", "LOG_ASYNC", "DEVICE_LOST_AT", "STAGING_FAIL_AT", "VRAM_BALLAST_MB",
|
||||||
"TEX_COMPACT", "TEX_COMPACT_MIN_MB", "TEX_COMPACT_FRAME_MB", // texture compaction (vk_texture.c); no menu row
|
"TEX_COMPACT", "TEX_COMPACT_MIN_MB", "TEX_COMPACT_FRAME_MB", // texture compaction (vk_texture.c); no menu row
|
||||||
@@ -109,7 +109,7 @@ static const struct { const char *key, *section; } sections[] = {
|
|||||||
{"FULLSCREEN", "display"}, {"WINDOW_SIZE", "display"}, {"PERF_OVERLAY", "display"}, {"VK_PRESENT", "display"},
|
{"FULLSCREEN", "display"}, {"WINDOW_SIZE", "display"}, {"PERF_OVERLAY", "display"}, {"VK_PRESENT", "display"},
|
||||||
{"GPU_INDEX", "display"}, {"MONITOR", "display"}, {"OUTPUT_RES", "display"}, {"GAME_ASPECT", "display"}, {"GAME_RES", "display"}, {"RENDER_SCALE", "display"}, {"UPSCALER", "display"},
|
{"GPU_INDEX", "display"}, {"MONITOR", "display"}, {"OUTPUT_RES", "display"}, {"GAME_ASPECT", "display"}, {"GAME_RES", "display"}, {"RENDER_SCALE", "display"}, {"UPSCALER", "display"},
|
||||||
{"SHARPNESS", "display"}, {"STANDIN_FILTER", "display"}, {"SCENE_SHARE", "display"}, {"ASPECT", "display"}, {"FOV", "display"}, {"ANISO", "display"},
|
{"SHARPNESS", "display"}, {"STANDIN_FILTER", "display"}, {"SCENE_SHARE", "display"}, {"ASPECT", "display"}, {"FOV", "display"}, {"ANISO", "display"},
|
||||||
{"TEXTURE_DETAIL", "display"}, {"VRAM_USE", "display"},
|
{"TEXTURE_DETAIL", "display"},
|
||||||
{"COLOR_PRESET", "display"},
|
{"COLOR_PRESET", "display"},
|
||||||
{"COLOR_BRIGHTNESS", "display"}, {"COLOR_CONTRAST", "display"}, {"COLOR_SATURATION", "display"},
|
{"COLOR_BRIGHTNESS", "display"}, {"COLOR_CONTRAST", "display"}, {"COLOR_SATURATION", "display"},
|
||||||
{"COLOR_GAMMA", "display"}, {"HDR", "display"}, {"HDR_LIVE", "display"}, {"HDR_PEAK_NITS", "display"}, {"HDR_GAME_NITS", "display"},
|
{"COLOR_GAMMA", "display"}, {"HDR", "display"}, {"HDR_LIVE", "display"}, {"HDR_PEAK_NITS", "display"}, {"HDR_GAME_NITS", "display"},
|
||||||
@@ -213,10 +213,6 @@ static const CfgMeta metas[] = {
|
|||||||
{"ASPECT", "fit", "fit|stretch", LIVE}, {"FOV", "100", "70..140", LIVE},
|
{"ASPECT", "fit", "fit|stretch", LIVE}, {"FOV", "100", "70..140", LIVE},
|
||||||
{"ANISO", "16", "game|2|4|8|16", LIVE}, // vk_texture.c sampler_features, vk_sampler_aniso_live; 16: the game asks 1x or 2x
|
{"ANISO", "16", "game|2|4|8|16", LIVE}, // vk_texture.c sampler_features, vk_sampler_aniso_live; 16: the game asks 1x or 2x
|
||||||
{"TEXTURE_DETAIL", "auto", "auto|full|reduced|low", RESTART}, // vk_texture.c "texture detail", read at the first texture
|
{"TEXTURE_DETAIL", "auto", "auto|full|reduced|low", RESTART}, // vk_texture.c "texture detail", read at the first texture
|
||||||
// video memory use: low, the default, keeps released textures for the hold and frees what features switched off
|
|
||||||
// hold; high sets the VRAMHIGH defaults below and keeps those (cfg_vram_keep: vk_dlaa.c idle_release, vk_fsr.c
|
|
||||||
// idle_note, vk_aa.c work_idle). balanced, the default before 0.10, reads as low.
|
|
||||||
{"VRAM_USE", "low", "low|high", RESTART},
|
|
||||||
// colour adjustment (vk_color.c); the preset is the menu's, the four values are what the present uses
|
// colour adjustment (vk_color.c); the preset is the menu's, the four values are what the present uses
|
||||||
{"COLOR_PRESET", "default", "default|vivid|clarity|custom", LIVE}, {"COLOR_BRIGHTNESS", "0", "-30..30", LIVE},
|
{"COLOR_PRESET", "default", "default|vivid|clarity|custom", LIVE}, {"COLOR_BRIGHTNESS", "0", "-30..30", LIVE},
|
||||||
{"COLOR_CONTRAST", "100", "70..150", LIVE}, {"COLOR_SATURATION", "100", "50..200", LIVE},
|
{"COLOR_CONTRAST", "100", "70..150", LIVE}, {"COLOR_SATURATION", "100", "50..200", LIVE},
|
||||||
@@ -369,7 +365,7 @@ static const CfgMeta metas[] = {
|
|||||||
// textures and memory
|
// textures and memory
|
||||||
{"ASTC", "auto", "auto|gpu|native|cpu", RESTART}, {"MEMORY", "auto", "auto|import|mirror|verify", RESTART},
|
{"ASTC", "auto", "auto|gpu|native|cpu", RESTART}, {"MEMORY", "auto", "auto|import|mirror|verify", RESTART},
|
||||||
{"TEX_ALIAS", "1", "0|1", RESTART}, {"DEPTH_INIT_INLINE", "1", "0|1", RESTART}, {"DEPTH_ALIAS_LOG", "0", "0|1", RESTART}, {"TEX_DISUSE", "1", "0|1|2", RESTART}, {"TEX_DISUSE_EVICT", "0", "0|1", RESTART}, {"TEX_GEN_UNDO", "1", "0|1", RESTART}, {"TEX_REUSE", "1", "0|1", RESTART}, {"TEX_SPLIT_FILL", "1", "0|1|2", RESTART}, {"TEX_VRAM_PRESSURE", "80", "0..100", RESTART},
|
{"TEX_ALIAS", "1", "0|1", RESTART}, {"DEPTH_INIT_INLINE", "1", "0|1", RESTART}, {"DEPTH_ALIAS_LOG", "0", "0|1", RESTART}, {"TEX_DISUSE", "1", "0|1|2", RESTART}, {"TEX_DISUSE_EVICT", "0", "0|1", RESTART}, {"TEX_GEN_UNDO", "1", "0|1", RESTART}, {"TEX_REUSE", "1", "0|1", RESTART}, {"TEX_SPLIT_FILL", "1", "0|1|2", RESTART}, {"TEX_VRAM_PRESSURE", "80", "0..100", RESTART},
|
||||||
// vk_texture.c drop_aged: seconds a released texture is kept unused (vk_tex_release.h); vram_use = high sets 0
|
// vk_texture.c drop_aged: seconds a released texture is kept unused (vk_tex_release.h)
|
||||||
{"TEX_RELEASED_HOLD", "180", "0..900", RESTART}, {"ASTC_BC", "", "0|1", RESTART}, {"ZSTD_NATIVE", "1", "0|1", RESTART}, {"ZSTD_CHECK", "0", "0|1", RESTART},
|
{"TEX_RELEASED_HOLD", "180", "0..900", RESTART}, {"ASTC_BC", "", "0|1", RESTART}, {"ZSTD_NATIVE", "1", "0|1", RESTART}, {"ZSTD_CHECK", "0", "0|1", RESTART},
|
||||||
{"TEX_CLOBBER", "0", "0|1", RESTART},
|
{"TEX_CLOBBER", "0", "0|1", RESTART},
|
||||||
{"LOW_END_GPU", "0", "0|1", RESTART}, // LOWEND below
|
{"LOW_END_GPU", "0", "0|1", RESTART}, // LOWEND below
|
||||||
@@ -658,40 +654,6 @@ static const char *lowend_value(const char *key) {
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// vram_use (NX2NAVI_VRAM_USE, the Screen tab's Video memory use row): low, the default, or high. low keeps a released
|
|
||||||
// texture until it has gone unused for the hold (vk_texture.c drop_aged, TEX_RELEASED_HOLD 180 s; vk_tex_release.h has
|
|
||||||
// the take-back figures behind it: in play the game took released textures back within a minute or not at all) and
|
|
||||||
// frees what a switched-off upscaler or SMAA holds.
|
|
||||||
// high sets the VRAMHIGH defaults for the keys the player does not set, after the device profile and the low-end mode:
|
|
||||||
// TEX_RELEASED_HOLD 0, released textures stay up to the size bound (a quarter of the video memory budget) for the whole
|
|
||||||
// session, as before 0.10; and it keeps what a switched-off feature holds (cfg_vram_keep). balanced, the default before
|
|
||||||
// 0.10, and anything else read as low.
|
|
||||||
// What the low of the 0.10 previews set and did cost something stays to be set on its own:
|
|
||||||
// - TEX_RELEASED_MB 1024: released textures keep at most 1 GiB; those the game takes back after a drop are made and
|
|
||||||
// uploaded or decoded again and show their stand-in for a frame (81 to 218 in each 3600 presents of a session on an
|
|
||||||
// RTX 5090, vk_texture.c released_cap_bytes).
|
|
||||||
// - TEX_VRAM_PRESSURE 70: textures that come back intact give way from 70% of the budget on, not 80% (sweep_pressure),
|
|
||||||
// and are made again when next used.
|
|
||||||
// - PIPE_SEED_BOOT 0: the shared list's pipelines this install never drew are made at their first draw, not at the
|
|
||||||
// start, which leaves out 0.3-0.6 GiB of video memory and 2-4 GB of commit; a session so set missed 1,091 pipelines
|
|
||||||
// at a draw, 115 of them for 8 to 34 ms, and their draws were skipped (vk_pipeline.c seed_boot).
|
|
||||||
// Unsampled live textures are not dropped in either (tex_disuse_evict stays 0): that eviction left the ground flat and
|
|
||||||
// see-through for good (vk_texture.c disuse_evict_on).
|
|
||||||
static const struct { const char *key, *value; } VRAMHIGH[] = {
|
|
||||||
{"TEX_RELEASED_HOLD", "0"},
|
|
||||||
};
|
|
||||||
static const char *vram_use_value(const char *key) {
|
|
||||||
const char *set = raw_get(PREFIX "VRAM_USE");
|
|
||||||
if (!set || strcmp(set, "high")) return NULL;
|
|
||||||
for (size_t i = 0; i < sizeof VRAMHIGH / sizeof *VRAMHIGH; i++)
|
|
||||||
if (!strcasecmp(VRAMHIGH[i].key, key)) return VRAMHIGH[i].value;
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
int cfg_vram_keep(void) {
|
|
||||||
const char *set = cfg_get(PREFIX "VRAM_USE");
|
|
||||||
return set && !strcmp(set, "high");
|
|
||||||
}
|
|
||||||
|
|
||||||
static int profile_of(void) {
|
static int profile_of(void) {
|
||||||
int p = __atomic_load_n(&profile, __ATOMIC_ACQUIRE);
|
int p = __atomic_load_n(&profile, __ATOMIC_ACQUIRE);
|
||||||
if (p >= 0) return p;
|
if (p >= 0) return p;
|
||||||
@@ -722,8 +684,7 @@ static const char *cfg_get_now(const char *name) {
|
|||||||
if (profile_of())
|
if (profile_of())
|
||||||
for (size_t i = 0; i < sizeof DECK / sizeof *DECK; i++)
|
for (size_t i = 0; i < sizeof DECK / sizeof *DECK; i++)
|
||||||
if (!strcasecmp(DECK[i].key, name + PREFIX_LEN)) return DECK[i].value;
|
if (!strcasecmp(DECK[i].key, name + PREFIX_LEN)) return DECK[i].value;
|
||||||
const char *low = lowend_value(name + PREFIX_LEN);
|
return lowend_value(name + PREFIX_LEN);
|
||||||
return low ? low : vram_use_value(name + PREFIX_LEN);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Whether name's value comes from the player (the environment or nx2navi.ini), not a profile or the table.
|
// Whether name's value comes from the player (the environment or nx2navi.ini), not a profile or the table.
|
||||||
@@ -825,7 +786,6 @@ const char *cfg_default(const char *key) {
|
|||||||
if (!strcasecmp(DECK[i].key, name)) return DECK[i].value;
|
if (!strcasecmp(DECK[i].key, name)) return DECK[i].value;
|
||||||
const char *low = lowend_value(name);
|
const char *low = lowend_value(name);
|
||||||
if (low) return low;
|
if (low) return low;
|
||||||
if ((low = vram_use_value(name))) return low;
|
|
||||||
const CfgMeta *m = cfg_meta(key);
|
const CfgMeta *m = cfg_meta(key);
|
||||||
return m ? m->def : NULL;
|
return m ? m->def : NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,8 +27,6 @@ int cfg_from_env(const char *name);
|
|||||||
// 1 when the player set name (the environment or nx2navi.ini), 0 when cfg_get gives a device profile's default or NULL.
|
// 1 when the player set name (the environment or nx2navi.ini), 0 when cfg_get gives a device profile's default or NULL.
|
||||||
int cfg_is_set(const char *name);
|
int cfg_is_set(const char *name);
|
||||||
int cfg_low_end_active(void); // the low-end GPU mode was on when the game started (cfg.c LOWEND)
|
int cfg_low_end_active(void); // the low-end GPU mode was on when the game started (cfg.c LOWEND)
|
||||||
// vram_use = high: what a feature switched off holds stays for the run (cfg.c VRAMLOW, the comment above it)
|
|
||||||
int cfg_vram_keep(void);
|
|
||||||
// The keys of the file's lines that are no settings of this version, lower-case with ", " between them ("" when there
|
// The keys of the file's lines that are no settings of this version, lower-case with ", " between them ("" when there
|
||||||
// are none; a list too long to keep ends early), and how many there are. Such a line does nothing: the log says so at
|
// are none; a list too long to keep ends early), and how many there are. Such a line does nothing: the log says so at
|
||||||
// start and the settings menu shows it (ui/menu.cpp), so that nobody takes one for the cause of what they see.
|
// start and the settings menu shows it (ui/menu.cpp), so that nobody takes one for the cause of what they see.
|
||||||
|
|||||||
@@ -770,16 +770,6 @@ static void row_texture_detail(void) {
|
|||||||
opt_choice_list("NX2NAVI_TEXTURE_DETAIL", UI_MENU_TEX_DETAIL, vals, names, 4, UI_MENU_TEX_DETAIL_DESC);
|
opt_choice_list("NX2NAVI_TEXTURE_DETAIL", UI_MENU_TEX_DETAIL, vals, names, 4, UI_MENU_TEX_DETAIL_DESC);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Video memory use (cfg.c vram_use_value, cfg_vram_keep): low, the default, lets released textures go after the hold
|
|
||||||
// (vk_texture.c drop_aged) and frees what switched-off features made; high keeps both. Any value but high is low, as
|
|
||||||
// cfg.c reads it (balanced, the default before 0.10, among them). Read at the start, so the row notes the restart.
|
|
||||||
static void row_vram_use(void) {
|
|
||||||
static const char *const vals[] = {"low", "high"};
|
|
||||||
const char *names[] = {menu_text(UI_MENU_VRAM_USE_LOW), menu_text(UI_MENU_VRAM_USE_HIGH)};
|
|
||||||
opt_choice_list("NX2NAVI_VRAM_USE", UI_MENU_VRAM_USE, vals, names, 2, UI_MENU_VRAM_USE_DESC,
|
|
||||||
cfg_vram_keep() ? 1 : 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void row_shadow_scale(void) {
|
static void row_shadow_scale(void) {
|
||||||
static const char *const vals[] = {"1", "2", "3", "4"};
|
static const char *const vals[] = {"1", "2", "3", "4"};
|
||||||
static const char *const names[] = {"960 (1x)", "1920 (2x)", "2880 (3x)", "3840 (4x)"};
|
static const char *const names[] = {"960 (1x)", "1920 (2x)", "2880 (3x)", "3840 (4x)"};
|
||||||
@@ -1366,7 +1356,6 @@ static void tab_screen(float scale) {
|
|||||||
const char *aniso_names[] = {menu_text(UI_MENU_ANISO_GAME), "2x", "4x", "8x", "16x"};
|
const char *aniso_names[] = {menu_text(UI_MENU_ANISO_GAME), "2x", "4x", "8x", "16x"};
|
||||||
opt_choice_list("NX2NAVI_ANISO", UI_MENU_ANISO, aniso, aniso_names, 5, UI_MENU_ANISO_DESC);
|
opt_choice_list("NX2NAVI_ANISO", UI_MENU_ANISO, aniso, aniso_names, 5, UI_MENU_ANISO_DESC);
|
||||||
row_texture_detail();
|
row_texture_detail();
|
||||||
row_vram_use();
|
|
||||||
opt_end();
|
opt_end();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -99,13 +99,6 @@ static const char *const text_en[UI_TEXT_COUNT] = {
|
|||||||
[UI_MENU_TEX_DETAIL_DESC] = "Sharpness of large surface textures. Reduced and Low leave out their largest versions, so that an area fits the video memory of 6 and 8 GB cards; only surfaces seen up close look softer. Automatic picks by the card's video memory.",
|
[UI_MENU_TEX_DETAIL_DESC] = "Sharpness of large surface textures. Reduced and Low leave out their largest versions, so that an area fits the video memory of 6 and 8 GB cards; only surfaces seen up close look softer. Automatic picks by the card's video memory.",
|
||||||
[UI_MENU_TEX_DETAIL_AUTO] = "Automatic: %s",
|
[UI_MENU_TEX_DETAIL_AUTO] = "Automatic: %s",
|
||||||
[UI_MENU_TEX_DETAIL_FULL] = "Full", [UI_MENU_TEX_DETAIL_REDUCED] = "Reduced", [UI_MENU_TEX_DETAIL_LOW] = "Low",
|
[UI_MENU_TEX_DETAIL_FULL] = "Full", [UI_MENU_TEX_DETAIL_REDUCED] = "Reduced", [UI_MENU_TEX_DETAIL_LOW] = "Low",
|
||||||
[UI_MENU_VRAM_USE] = "Video memory use",
|
|
||||||
[UI_MENU_VRAM_USE_DESC] = "How much video memory the game keeps for later. Low, the default, lets go of the textures "
|
|
||||||
"of places you left once they have gone unused for three minutes, and of what an upscaler "
|
|
||||||
"or anti-aliasing switched off had made; in play the game asked for such textures again "
|
|
||||||
"within a minute or not at all. High keeps both for the whole session. Takes effect after "
|
|
||||||
"a restart.",
|
|
||||||
[UI_MENU_VRAM_USE_LOW] = "Low", [UI_MENU_VRAM_USE_HIGH] = "High",
|
|
||||||
[UI_MENU_LOWEND_INTRO] = "The settings of the low-end GPU mode. Each can be changed here; most take effect after a restart.",
|
[UI_MENU_LOWEND_INTRO] = "The settings of the low-end GPU mode. Each can be changed here; most take effect after a restart.",
|
||||||
[UI_MENU_LOWEND_RESTART] = "The mode turns on after a restart. Its settings are listed here then.",
|
[UI_MENU_LOWEND_RESTART] = "The mode turns on after a restart. Its settings are listed here then.",
|
||||||
[UI_MENU_LOWEND_NOT_FOR_CARD] = "Not for this graphics card: it has mesh shaders and 8 GB of video memory or more. "
|
[UI_MENU_LOWEND_NOT_FOR_CARD] = "Not for this graphics card: it has mesh shaders and 8 GB of video memory or more. "
|
||||||
@@ -922,13 +915,6 @@ static const char *const text_ru[UI_TEXT_COUNT] = {
|
|||||||
[UI_MENU_TEX_DETAIL_DESC] = "Чёткость больших текстур поверхностей. «Сниженная» и «Низкая» не загружают их самые крупные версии, чтобы область помещалась в видеопамять карт на 6 и 8 ГБ; мягче выглядят только поверхности вблизи. «Авто» выбирает по объёму видеопамяти.",
|
[UI_MENU_TEX_DETAIL_DESC] = "Чёткость больших текстур поверхностей. «Сниженная» и «Низкая» не загружают их самые крупные версии, чтобы область помещалась в видеопамять карт на 6 и 8 ГБ; мягче выглядят только поверхности вблизи. «Авто» выбирает по объёму видеопамяти.",
|
||||||
[UI_MENU_TEX_DETAIL_AUTO] = "Авто: %s",
|
[UI_MENU_TEX_DETAIL_AUTO] = "Авто: %s",
|
||||||
[UI_MENU_TEX_DETAIL_FULL] = "Полная", [UI_MENU_TEX_DETAIL_REDUCED] = "Сниженная", [UI_MENU_TEX_DETAIL_LOW] = "Низкая",
|
[UI_MENU_TEX_DETAIL_FULL] = "Полная", [UI_MENU_TEX_DETAIL_REDUCED] = "Сниженная", [UI_MENU_TEX_DETAIL_LOW] = "Низкая",
|
||||||
[UI_MENU_VRAM_USE] = "Расход видеопамяти",
|
|
||||||
[UI_MENU_VRAM_USE_DESC] = "Сколько видеопамяти игра держит про запас. «Низкий», по умолчанию, освобождает текстуры "
|
|
||||||
"покинутых мест, не использованные три минуты, и то, что создали отключённые "
|
|
||||||
"масштабирование или сглаживание; в игре такие текстуры запрашивались снова в течение "
|
|
||||||
"минуты или не запрашивались вовсе. «Высокий» хранит и то и другое всю сессию. Действует "
|
|
||||||
"после перезапуска.",
|
|
||||||
[UI_MENU_VRAM_USE_LOW] = "Низкий", [UI_MENU_VRAM_USE_HIGH] = "Высокий",
|
|
||||||
[UI_MENU_SHARPNESS] = "Резкость FSR",
|
[UI_MENU_SHARPNESS] = "Резкость FSR",
|
||||||
[UI_MENU_SHARPNESS_DESC] = "Насколько FSR повышает резкость. 0 отключает.",
|
[UI_MENU_SHARPNESS_DESC] = "Насколько FSR повышает резкость. 0 отключает.",
|
||||||
[UI_MENU_SHARPNESS_NEEDS_FSR] = "только с AMD FSR 1",
|
[UI_MENU_SHARPNESS_NEEDS_FSR] = "только с AMD FSR 1",
|
||||||
@@ -1875,13 +1861,6 @@ static const char *const text_pt_br[UI_TEXT_COUNT] = {
|
|||||||
"da placa.",
|
"da placa.",
|
||||||
[UI_MENU_TEX_DETAIL_AUTO] = "Automático: %s",
|
[UI_MENU_TEX_DETAIL_AUTO] = "Automático: %s",
|
||||||
[UI_MENU_TEX_DETAIL_FULL] = "Completo", [UI_MENU_TEX_DETAIL_REDUCED] = "Reduzido", [UI_MENU_TEX_DETAIL_LOW] = "Baixo",
|
[UI_MENU_TEX_DETAIL_FULL] = "Completo", [UI_MENU_TEX_DETAIL_REDUCED] = "Reduzido", [UI_MENU_TEX_DETAIL_LOW] = "Baixo",
|
||||||
[UI_MENU_VRAM_USE] = "Uso da memória de vídeo",
|
|
||||||
[UI_MENU_VRAM_USE_DESC] = "Quanta memória de vídeo o jogo guarda para depois. Baixo, o padrão, libera as texturas "
|
|
||||||
"dos lugares que você deixou após três minutos sem uso, e o que um escalonador ou "
|
|
||||||
"antisserrilhamento desligado criou; em jogo, essas texturas foram pedidas de novo em "
|
|
||||||
"menos de um minuto ou nunca. Alto guarda tudo isso durante a sessão inteira. Vale depois "
|
|
||||||
"de reiniciar.",
|
|
||||||
[UI_MENU_VRAM_USE_LOW] = "Baixo", [UI_MENU_VRAM_USE_HIGH] = "Alto",
|
|
||||||
[UI_MENU_COLOR] = "Cor",
|
[UI_MENU_COLOR] = "Cor",
|
||||||
[UI_MENU_COLOR_PRESET] = "Perfil de cor",
|
[UI_MENU_COLOR_PRESET] = "Perfil de cor",
|
||||||
[UI_MENU_COLOR_PRESET_DESC] = "Define os quatro valores abaixo. Vívido: mais contraste e saturação, sombras um "
|
[UI_MENU_COLOR_PRESET_DESC] = "Define os quatro valores abaixo. Vívido: mais contraste e saturação, sombras um "
|
||||||
@@ -2676,10 +2655,6 @@ static const char *const text_zh_hans[UI_TEXT_COUNT] = {
|
|||||||
[UI_MENU_TEX_DETAIL_DESC] = "大型表面纹理的清晰度。“降低”和“低”不加载它们最大的版本,使一个区域能放进 6 GB 和 8 GB 显卡的显存;只有近处的表面看起来略微柔和。“自动”根据显卡的显存选择。",
|
[UI_MENU_TEX_DETAIL_DESC] = "大型表面纹理的清晰度。“降低”和“低”不加载它们最大的版本,使一个区域能放进 6 GB 和 8 GB 显卡的显存;只有近处的表面看起来略微柔和。“自动”根据显卡的显存选择。",
|
||||||
[UI_MENU_TEX_DETAIL_AUTO] = "自动:%s",
|
[UI_MENU_TEX_DETAIL_AUTO] = "自动:%s",
|
||||||
[UI_MENU_TEX_DETAIL_FULL] = "完整", [UI_MENU_TEX_DETAIL_REDUCED] = "降低", [UI_MENU_TEX_DETAIL_LOW] = "低",
|
[UI_MENU_TEX_DETAIL_FULL] = "完整", [UI_MENU_TEX_DETAIL_REDUCED] = "降低", [UI_MENU_TEX_DETAIL_LOW] = "低",
|
||||||
[UI_MENU_VRAM_USE] = "显存占用",
|
|
||||||
[UI_MENU_VRAM_USE_DESC] = "游戏为之后保留多少显存。“低”(默认)会释放已离开地点中三分钟未使用的纹理,以及已关闭的放大或抗锯齿"
|
|
||||||
"创建的内容;实际游玩中,这类纹理要么在一分钟内再次被使用,要么不再使用。“高”在整个游戏过程中保留两者。重启后生效。",
|
|
||||||
[UI_MENU_VRAM_USE_LOW] = "低", [UI_MENU_VRAM_USE_HIGH] = "高",
|
|
||||||
[UI_MENU_HDR_GROUP] = "HDR",
|
[UI_MENU_HDR_GROUP] = "HDR",
|
||||||
[UI_MENU_HDR] = "HDR 输出",
|
[UI_MENU_HDR] = "HDR 输出",
|
||||||
[UI_MENU_HDR_DESC] = "在 HDR 显示器上呈现更亮的高光。请先在 Windows 中开启 HDR。",
|
[UI_MENU_HDR_DESC] = "在 HDR 显示器上呈现更亮的高光。请先在 Windows 中开启 HDR。",
|
||||||
|
|||||||
@@ -50,7 +50,6 @@ typedef enum {
|
|||||||
UI_MENU_TEX_DETAIL, UI_MENU_TEX_DETAIL_DESC,
|
UI_MENU_TEX_DETAIL, UI_MENU_TEX_DETAIL_DESC,
|
||||||
UI_MENU_TEX_DETAIL_AUTO, // "Automatic: %s", %s the level it picks on this card
|
UI_MENU_TEX_DETAIL_AUTO, // "Automatic: %s", %s the level it picks on this card
|
||||||
UI_MENU_TEX_DETAIL_FULL, UI_MENU_TEX_DETAIL_REDUCED, UI_MENU_TEX_DETAIL_LOW,
|
UI_MENU_TEX_DETAIL_FULL, UI_MENU_TEX_DETAIL_REDUCED, UI_MENU_TEX_DETAIL_LOW,
|
||||||
UI_MENU_VRAM_USE, UI_MENU_VRAM_USE_DESC, UI_MENU_VRAM_USE_LOW, UI_MENU_VRAM_USE_HIGH,
|
|
||||||
UI_MENU_SHARPNESS, UI_MENU_SHARPNESS_DESC, UI_MENU_SHARPNESS_NEEDS_FSR,
|
UI_MENU_SHARPNESS, UI_MENU_SHARPNESS_DESC, UI_MENU_SHARPNESS_NEEDS_FSR,
|
||||||
UI_MENU_COLOR, // group heading over the colour rows
|
UI_MENU_COLOR, // group heading over the colour rows
|
||||||
UI_MENU_COLOR_PRESET, UI_MENU_COLOR_PRESET_DESC, UI_MENU_COLOR_DEFAULT, UI_MENU_COLOR_VIVID, UI_MENU_COLOR_CLARITY,
|
UI_MENU_COLOR_PRESET, UI_MENU_COLOR_PRESET_DESC, UI_MENU_COLOR_DEFAULT, UI_MENU_COLOR_VIVID, UI_MENU_COLOR_CLARITY,
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ static void img_free(Img *m);
|
|||||||
// long pause or loading screen with smaa set also counts as unused, and the images are made again after it.
|
// long pause or loading screen with smaa set also counts as unused, and the images are made again after it.
|
||||||
#define WORK_IDLE 3600
|
#define WORK_IDLE 3600
|
||||||
static void work_idle(uint64_t frame) {
|
static void work_idle(uint64_t frame) {
|
||||||
if (!P.luma.img || frame - P.smaa_frame < WORK_IDLE || cfg_vram_keep()) return; // vram_use = high keeps them
|
if (!P.luma.img || frame - P.smaa_frame < WORK_IDLE) return;
|
||||||
rt_log("aa: SMAA's work images unused for %d frames: freed (%ux%u)", WORK_IDLE, P.w, P.h);
|
rt_log("aa: SMAA's work images unused for %d frames: freed (%ux%u)", WORK_IDLE, P.w, P.h);
|
||||||
img_free(&P.luma), img_free(&P.edges), img_free(&P.weights);
|
img_free(&P.luma), img_free(&P.edges), img_free(&P.weights);
|
||||||
P.w = P.h = 0;
|
P.w = P.h = 0;
|
||||||
|
|||||||
@@ -2825,7 +2825,7 @@ static int up_holds(void) {
|
|||||||
|
|
||||||
static void retire_idle(void) {
|
static void retire_idle(void) {
|
||||||
uint64_t now = __atomic_load_n(&D.presents, __ATOMIC_RELAXED);
|
uint64_t now = __atomic_load_n(&D.presents, __ATOMIC_RELAXED);
|
||||||
if (!idle_free() || cfg_vram_keep()) return; // as idle_release: vram_use = high keeps them
|
if (!idle_free()) return; // as idle_release
|
||||||
if (inputs_on()) { // the upscaler runs, or frame generation alone makes its inputs from a size (D.fgo)
|
if (inputs_on()) { // the upscaler runs, or frame generation alone makes its inputs from a size (D.fgo)
|
||||||
retire_off_at = 0;
|
retire_off_at = 0;
|
||||||
return;
|
return;
|
||||||
@@ -3034,7 +3034,7 @@ int vk_dlaa_resized_take(void) {
|
|||||||
#define IDLE_FREE_PRESENTS 600
|
#define IDLE_FREE_PRESENTS 600
|
||||||
static uint64_t off_at; // D.presents when DLSS went off
|
static uint64_t off_at; // D.presents when DLSS went off
|
||||||
static void idle_release(void) {
|
static void idle_release(void) {
|
||||||
if (!idle_free() || cfg_vram_keep()) return; // vram_use = high keeps them
|
if (!idle_free()) return;
|
||||||
if (D.hl && D.presents - D.hl_at >= IDLE_FREE_PRESENTS && !D.hl_fresh) {
|
if (D.hl && D.presents - D.hl_at >= IDLE_FREE_PRESENTS && !D.hl_fresh) {
|
||||||
rt_log("dlaa: the HUD-less picture for frame generation went unused for %d presents: freed", IDLE_FREE_PRESENTS);
|
rt_log("dlaa: the HUD-less picture for frame generation went unused for %d presents: freed", IDLE_FREE_PRESENTS);
|
||||||
hl_destroy();
|
hl_destroy();
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ static struct {
|
|||||||
#define IDLE_FREE 600
|
#define IDLE_FREE 600
|
||||||
static void free_images(VkCtx *c);
|
static void free_images(VkCtx *c);
|
||||||
static void idle_note(unsigned slot) {
|
static void idle_note(unsigned slot) {
|
||||||
if (!F.img[0] || cfg_vram_keep()) return; // vram_use = high keeps them
|
if (!F.img[0]) return;
|
||||||
F.since |= 1u << (slot % SLOTS);
|
F.since |= 1u << (slot % SLOTS);
|
||||||
if (++F.idle < IDLE_FREE || (F.since & F.used_slots) != F.used_slots) return;
|
if (++F.idle < IDLE_FREE || (F.since & F.used_slots) != F.used_slots) return;
|
||||||
rt_log("vk: FSR's images unused for %u presents: freed (%ux%u)", F.idle, F.w, F.h);
|
rt_log("vk: FSR's images unused for %u presents: freed (%ux%u)", F.idle, F.w, F.h);
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
// past it the oldest released textures go even when young. With the hold on, young ones past it are kept while the card
|
// past it the oldest released textures go even when young. With the hold on, young ones past it are kept while the card
|
||||||
// and the system have room (trl_room), up to TRL_ROOM_TIMES the bound: the old Balanced dropped 31 young ones in a
|
// and the system have room (trl_room), up to TRL_ROOM_TIMES the bound: the old Balanced dropped 31 young ones in a
|
||||||
// burst of area changes at its bound of 4 GiB on a card with 20 GiB free, and each was made again within a minute. The
|
// burst of area changes at its bound of 4 GiB on a card with 20 GiB free, and each was made again within a minute. The
|
||||||
// hold empties that excess within minutes, so the room it takes is temporary; without the hold (vram_use = high) the
|
// hold empties that excess within minutes, so the room it takes is temporary; without the hold (tex_released_hold = 0) the
|
||||||
// bound acts as before.
|
// bound acts as before.
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|||||||
@@ -2661,7 +2661,7 @@ static void drop_overwritten(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ---- released textures by age (vk_tex_release.h has the take-back figures behind the hold)
|
// ---- released textures by age (vk_tex_release.h has the take-back figures behind the hold)
|
||||||
// NX2NAVI_TEX_RELEASED_HOLD (seconds, default TRL_HOLD_S, at most TRL_HOLD_MAX_S; 0 = no hold; vram_use = high sets 0):
|
// NX2NAVI_TEX_RELEASED_HOLD (seconds, default TRL_HOLD_S, at most TRL_HOLD_MAX_S; 0 = no hold):
|
||||||
// a released entry that owns memory goes once it has gone unused that long, twice that for content only the GPU made,
|
// a released entry that owns memory goes once it has gone unused that long, twice that for content only the GPU made,
|
||||||
// whatever the size bound says. Unused counts from the release or the last sample of the released image, whichever is
|
// whatever the size bound says. Unused counts from the release or the last sample of the released image, whichever is
|
||||||
// later, in seconds of the wall clock (secs_since). The rules drop_stale keeps hold here too: not before stale_after
|
// later, in seconds of the wall clock (secs_since). The rules drop_stale keeps hold here too: not before stale_after
|
||||||
|
|||||||
Reference in New Issue
Block a user