Remove the low-end GPU mode from the settings.

The user asked for it: the mode no longer gains frame rate, and the mesh shader fallback covers the cards it was written for. Its switch in the settings menu's Game tab is gone with the rows under it, and so are their 57 text ids and strings.

low_end_gpu itself does nothing any more. It is still a known key, so an older nx2navi.ini gives no unknown-key warning, and while it is on the log says once that the mode was removed in 0.10.2. The preset that gave nine keys other defaults is gone, and so is the rule that read the mode's keys only while it was on: each of them (mesh_emulation, tex_clobber, foliage, vram_heap_limit, vram_reserve_mb, upload_batch_mb, mirror_stage, mirror_hot, submit_finish_gpu and the others) is an ordinary setting with the default of its row or of its reader, so a line a player wrote by hand keeps counting and a file with only the switch runs the game as it runs for everyone else. guest_opt in nx2navi.ini counts for the next rebuild without the switch too (tools/make_game.py).

The recorder thread read the switch itself: on an AMD card without mesh shaders the mode turned it on. It is off on every AMD card now unless vk_recorder = 1 is set.

nx2navi.ini.example lists the former mode's settings as single settings, the 0.10.2 notes have a Removed entry and name the foliage fix of the commit before this one, and the comments that said what the mode sets say so in the past tense. tests/cfg_parse_check has the new reading of the switch and of the keys without it; the test matrix is at 90 ok with the same two not ok as before (installer_test, worktree_test), and a clean build compiles 169 runtime files and links. Not run in the game.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-14 06:13:18 -05:00
parent 1610ab6e08
commit 7a8bbad47e
21 changed files with 138 additions and 364 deletions

View File

@@ -91,8 +91,6 @@ int vk_fg4_failed(void); // ... it failed in this run, FSR 3.1's
int vk_fg4_active(void); // ... its swapchain is in place
const char *vk_fg4_name(void); // ... the version the library runs here ("3.1.6", "4.0.2")
int vk_texture_detail_auto(void); // vk_texture.c: the texture detail auto picks on this card, 0 full to 2 low
int vk_mesh_shader_native(void); // vk_device.c: the GPU has mesh shaders (the mesh emulation does nothing)
int vk_low_end_card(void); // vk_device.c: no mesh shaders, or under 8 GiB of video memory
int vk_exec_replay_workers_auto(const char **why); // vk_exec.c: replay_workers = auto's count on this PC
double frame_step_limit_hz(void);
int frame_limit_adjustable(void);
@@ -1454,7 +1452,6 @@ static void rows_saves(void) {
if (line[0]) opt_text_str(line, warn);
}
static void rows_low_end(void);
static void tab_game(float scale) {
opt_begin("##game", scale);
@@ -1502,16 +1499,6 @@ static void tab_game(float scale) {
"of area: keep a copy of the save first.", on))
opt_apply("NX2NAVI_DEBUG_MENU", on ? "0" : "1");
}
// Last, as its own settings follow it while it is on (rows_low_end). cfg.c LOWEND: the defaults for older graphics
// cards, read at start.
// Offered on the cards it was written for (vk_low_end_card). On any other the row cannot turn the mode on; while
// the mode is on there (set earlier, or in nx2navi.ini) the row stays usable, to turn it off again.
if (!cfg_bool("NX2NAVI_LOW_END_GPU") && !cfg_low_end_active() && !vk_low_end_card())
opt_disable_next(UI_MENU_LOWEND_NOT_FOR_CARD);
opt_toggle("NX2NAVI_LOW_END_GPU", UI_MENU_LOW_END_GPU, UI_MENU_LOW_END_GPU_DESC);
// the mode's settings are read only while it is on (cfg.c LOWEND_ONLY), so their rows wait for the restart too
if (cfg_low_end_active()) rows_low_end();
else if (cfg_bool("NX2NAVI_LOW_END_GPU")) opt_text(UI_MENU_LOWEND_RESTART);
opt_end();
}
@@ -1722,78 +1709,6 @@ static void tab_controls(float scale) {
binds_after_page();
}
// ---- the settings of the low-end GPU mode, under its switch in the Game tab while that is on (tab_game): each is read
// where the code it sets reads it
static void rows_low_end(void) {
opt_text(UI_MENU_LOWEND_INTRO);
opt_group(UI_MENU_LOWEND_MEMORY);
{ // vk_texture.c sweep_released
static const char *const values[] = {"", "512", "1024", "2048", "4096", "8192"};
const char *names[] = {menu_text(UI_MENU_AUTO), "512", "1024", "2048", "4096", "8192"};
opt_choice_list("NX2NAVI_TEX_RELEASED_MAX", UI_MENU_LOWEND_RELEASED, values, names, 6, UI_MENU_LOWEND_RELEASED_DESC);
}
opt_slider("NX2NAVI_MIRROR_HOT", UI_MENU_LOWEND_MIRROR_HOT, 0, 100, UI_MENU_LOWEND_MIRROR_HOT_DESC, 5, "%.0f %%");
{ // vk_device.c vram_heap_limits
static const char *const values[] = {"auto", "0"};
const char *names[] = {menu_text(UI_MENU_AUTO), menu_text(UI_MENU_OFF)};
opt_choice_list("NX2NAVI_VRAM_HEAP_LIMIT", UI_MENU_LOWEND_HEAP_LIMIT, values, names, 2, UI_MENU_LOWEND_HEAP_LIMIT_DESC);
}
{ // vk_vma_budget.c reserve_bytes
static const char *const values[] = {"512", "256", "768", "1024", "0"};
const char *names[] = {"512 MB", "256 MB", "768 MB", "1024 MB", menu_text(UI_MENU_OFF)};
opt_choice_list("NX2NAVI_VRAM_RESERVE_MB", UI_MENU_LOWEND_RESERVE, values, names, 5, UI_MENU_LOWEND_RESERVE_DESC);
}
{ // vk_memory.c upload_batch_cap
static const char *const values[] = {"128", "256", "512", "1024", "0"};
const char *names[] = {"128 MB", "256 MB", "512 MB", "1024 MB", menu_text(UI_MENU_LOWEND_NO_LIMIT)};
opt_choice_list("NX2NAVI_UPLOAD_BATCH_MB", UI_MENU_LOWEND_UPLOAD_BATCH, values, names, 5, UI_MENU_LOWEND_UPLOAD_BATCH_DESC);
}
opt_toggle("NX2NAVI_ASTC_SCRATCH_KEEP", UI_MENU_LOWEND_ASTC_KEEP, UI_MENU_LOWEND_ASTC_KEEP_DESC);
{ // vk_memory.c freeze_pass: submissions a region stays unwritten before it is frozen
static const char *const values[] = {"1800", "1200", "600", "60", "0"};
const char *names[] = {"1800", "1200", "600", "60", menu_text(UI_MENU_OFF)};
opt_choice_list("NX2NAVI_FREEZE_IDLE", UI_MENU_LOWEND_FREEZE, values, names, 5, UI_MENU_LOWEND_FREEZE_DESC);
}
{ // vk_sync.c res_mask: the result kinds the submit wait counts (31 all, 30 all but events)
static const char *const values[] = {"31", "30"};
const char *names[] = {menu_text(UI_MENU_LOWEND_RESULTS_ALL), menu_text(UI_MENU_LOWEND_RESULTS_NO_EVENTS)};
opt_choice_list("NX2NAVI_SUBMIT_FINISH_KINDS", UI_MENU_LOWEND_RESULTS, values, names, 2, UI_MENU_LOWEND_RESULTS_DESC);
}
opt_toggle("NX2NAVI_ZSTD_NATIVE", UI_MENU_LOWEND_ZSTD, UI_MENU_LOWEND_ZSTD_DESC); // ov_zstd.c trusted
opt_group(UI_MENU_LOWEND_RENDER);
opt_toggle("NX2NAVI_REPLAY_ASYNC", UI_MENU_LOWEND_ASYNC, UI_MENU_LOWEND_ASYNC_DESC); // vk_backend.c
const bool native = vk_mesh_shader_native() != 0; // vk_exec_draw.c: the emulation only where the GPU lacks them
if (native) opt_disable_next(UI_MENU_LOWEND_MESH_NATIVE);
opt_toggle("NX2NAVI_MESH_EMULATION", UI_MENU_LOWEND_MESH_EMU, UI_MENU_LOWEND_MESH_EMU_DESC);
{ // vk_exec_draw.c foliage_skip
static const char *const values[] = {"full", "reduced", "off"};
const char *names[] = {menu_text(UI_MENU_LOWEND_FOLIAGE_FULL), menu_text(UI_MENU_LOWEND_FOLIAGE_REDUCED), menu_text(UI_MENU_OFF)};
opt_choice_list("NX2NAVI_FOLIAGE", UI_MENU_LOWEND_FOLIAGE, values, names, 3, UI_MENU_LOWEND_FOLIAGE_DESC);
}
if (native) opt_disable_next(UI_MENU_LOWEND_MESH_NATIVE);
opt_slider("NX2NAVI_MESH_EMU_MB", UI_MENU_LOWEND_MESH_MB, 64, 2048, UI_MENU_LOWEND_MESH_MB_DESC, 64, "%.0f MB");
if (native) opt_disable_next(UI_MENU_LOWEND_MESH_NATIVE);
opt_slider("NX2NAVI_MESH_EMU_TASKS", UI_MENU_LOWEND_MESH_TASKS, 4096, 65536, UI_MENU_LOWEND_MESH_TASKS_DESC, 4096, "%.0f");
if (native) opt_disable_next(UI_MENU_LOWEND_MESH_NATIVE);
opt_toggle("NX2NAVI_MESH_EMU_BATCH", UI_MENU_LOWEND_MESH_BATCH, UI_MENU_LOWEND_MESH_BATCH_DESC); // vk_exec_draw.c
opt_toggle("NX2NAVI_TEX_CLOBBER", UI_MENU_LOWEND_CLOBBER, UI_MENU_LOWEND_CLOBBER_DESC);
static const UiTextId vec[] = {UI_MENU_OFF, UI_MENU_LOWEND_VEC_AUTO, UI_MENU_ON}; // gfx_shader.c patch_vec_index
opt_choice("NX2NAVI_VEC_INDEX_FIX", UI_MENU_LOWEND_VEC_INDEX, vec, 3, UI_MENU_LOWEND_VEC_INDEX_DESC);
opt_group(UI_MENU_LOWEND_BUILD);
// tools/make_game.py reads it from nx2navi.ini at the next Rebuild the Game (guest_opt_ini)
opt_toggle_value("NX2NAVI_GUEST_OPT", UI_MENU_LOWEND_GUEST_OPT, UI_MENU_LOWEND_GUEST_OPT_DESC, "2", "1",
menu_text(UI_MENU_LOWEND_GUEST_OPT_NOTE));
opt_group(UI_MENU_LOWEND_DIAG);
opt_toggle("NX2NAVI_PASS_TIMES", UI_MENU_LOWEND_PASS_TIMES, UI_MENU_LOWEND_PASS_TIMES_DESC); // vk_crumbs.c
#ifdef _WIN32
{ // vk_dump.c: the keys it knows
static const char *const values[] = {"", "pause", "scrolllock", "insert", "f12"};
const char *names[] = {menu_text(UI_MENU_OFF), "Pause", "Scroll Lock", "Insert", "F12"};
opt_choice_list("NX2NAVI_DUMP_KEY", UI_MENU_LOWEND_DUMP_KEY, values, names, 5, UI_MENU_LOWEND_DUMP_KEY_DESC);
}
#endif
}
static const UiTextId kTabNames[TAB_COUNT] = {UI_MENU_TAB_SCREEN, UI_MENU_TAB_GAME, UI_MENU_TAB_SOUND,
UI_MENU_TAB_CONTROLS};
static int g_tab; // the tab shown