mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-16 15:59:59 -04:00
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:
@@ -7,8 +7,8 @@ for what it links with. What the readers get and what the log says about the val
|
||||
it is part of the value; at most 16 lines, then a count;
|
||||
- switches written as words (cfg.c switch_word, cfg_bool): false, off and no in any case read as 0 and true, on and
|
||||
yes as 1 through cfg_get, cfg_bool and cfg_int, from the file and from the environment, with no line about them;
|
||||
the low-end mode's switch (cfg.c lowend_of, read apart from cfg_get) takes the same words, so "low_end_gpu = off"
|
||||
leaves the mode and its keys off;
|
||||
the switch of the low-end GPU mode, which is gone (cfg.c lowend_set), takes the same words for its one log line
|
||||
and turns nothing on: the mode's keys keep their own defaults and are read by themselves;
|
||||
- values outside their rows' sets (cfg.c check_value): a 0|1 switch with another value, a number outside its range, a
|
||||
word that is none of the menu's choices, each named with its line; none for a file whose values fit, nor for a list
|
||||
with numbers in it (the menu's presets); at most 16 lines, then a count;
|
||||
@@ -187,17 +187,26 @@ def main():
|
||||
'a file with 601 keys: one line at load from line 513 on', out)
|
||||
check(rc == 0 and len(set_lines) == 1 and 'VK_PRESENT is not kept' in set_lines[0],
|
||||
'two menu changes past a full table: one line', out)
|
||||
# the low-end mode's switch, read apart from cfg_get (cfg.c lowend_of): the same words as cfg_bool, from the file
|
||||
# and from the environment; the mode is decided once per process, so each value is its own run
|
||||
for text, extra, want in (
|
||||
('low_end_gpu = Off\n', None, "low_end 0 bool 0 mesh_emulation '(unset)'"),
|
||||
('low_end_gpu = 0 ; note\n', None, "low_end 0 bool 0 mesh_emulation '(unset)'"),
|
||||
('low_end_gpu = yes\n', None, "low_end 1 bool 1 mesh_emulation '1'"),
|
||||
('; nothing\n', {'NX2NAVI_LOW_END_GPU': 'FALSE'}, "low_end 0 bool 0 mesh_emulation '(unset)'"),
|
||||
('; nothing\n', {'NX2NAVI_LOW_END_GPU': '0 ; x'}, "low_end 1 bool 1 mesh_emulation '1'")):
|
||||
# the switch of the low-end GPU mode, which is gone (cfg.c lowend_set): on, it turns none of the mode's keys on and
|
||||
# gives none another default, and the log says once that the line does nothing; the same words as cfg_bool, from
|
||||
# the file and from the environment. The mode's keys are read by themselves, with or without the switch.
|
||||
gone = 'the low-end GPU mode was removed'
|
||||
unset = "mesh_emulation '(unset)' vram_reserve_mb '(unset)' default '0'"
|
||||
for text, extra, want, said in (
|
||||
('low_end_gpu = Off\n', None, f'bool 0 {unset}', 0),
|
||||
('low_end_gpu = 0 ; note\n', None, f'bool 0 {unset}', 0),
|
||||
('low_end_gpu = yes\n', None, f'bool 1 {unset}', 1),
|
||||
('low_end_gpu = 1\n', None, f'bool 1 {unset}', 1),
|
||||
('; nothing\n', {'NX2NAVI_LOW_END_GPU': 'FALSE'}, f'bool 0 {unset}', 0),
|
||||
('; nothing\n', {'NX2NAVI_LOW_END_GPU': '0 ; x'}, f'bool 1 {unset}', 1),
|
||||
('mesh_emulation = 1\nvram_reserve_mb = 512\n', None,
|
||||
"bool 0 mesh_emulation '1' vram_reserve_mb '512' default '0'", 0),
|
||||
('low_end_gpu = 1\nmesh_emulation = 1\n', None,
|
||||
"bool 1 mesh_emulation '1' vram_reserve_mb '(unset)' default '0'", 1)):
|
||||
rc, out = run(exe, env, 'lowend', text, work, extra)
|
||||
what = text.strip() if extra is None else f"the environment's {extra['NX2NAVI_LOW_END_GPU']!r}"
|
||||
check(rc == 0 and f'got: {want}' in out, f'low end: {what}: {want}', out)
|
||||
what = text.strip().replace('\n', ', ') if extra is None else f"the environment's {extra['NX2NAVI_LOW_END_GPU']!r}"
|
||||
check(rc == 0 and f'got: {want}' in out and out.count(gone) == said,
|
||||
f'low end: {what}: {want}, the removal said {said} time(s)', out)
|
||||
rc, out = run(exe, env, 'norow', CLEAN, work, {'NX2NAVI_NO_ROW_CHECK': 'abc'})
|
||||
check(rc == 0 and 'got: cfg_int 0 cfg_double 0' in out, 'cfg_int of a set, unparsable key without a row: 0', out)
|
||||
print(f'cfg_parse_check: {"FAILED" if bad else "ok"}')
|
||||
|
||||
Reference in New Issue
Block a user