mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 23: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:
@@ -2932,18 +2932,26 @@ class MakeGameTest(Tmp):
|
||||
with mock.patch.dict(os.environ, {'NX2NAVI_SHADER_CARRY': 'Off'}):
|
||||
self.assertFalse(self.mg.shader_carry(out))
|
||||
|
||||
def test_guest_opt_from_the_ini_only_with_the_low_end_mode_on(self):
|
||||
"""guest_opt_ini takes guest_opt from nx2navi.ini only while low_end_gpu is on as runtime/cfg.c lowend_of
|
||||
reads it: 0, off, false and no in any case are off."""
|
||||
def test_guest_opt_from_the_ini_counts_without_the_low_end_mode(self):
|
||||
"""guest_opt_ini takes guest_opt from nx2navi.ini by itself. Up to 0.10.1 it needed low_end_gpu on in the file;
|
||||
that mode is gone, and a low_end_gpu line of any value changes nothing. The environment's value stays."""
|
||||
out = self.tmp / 'game'
|
||||
out.mkdir()
|
||||
env = {k: v for k, v in os.environ.items() if k.upper() != 'NX2NAVI_GUEST_OPT'}
|
||||
for low, taken in (('1', True), ('yes', True), ('On', True), ('0', False), ('off', False), ('FALSE', False),
|
||||
('no', False), ('0 ; note', False)):
|
||||
(out / 'nx2navi.ini').write_text(f'guest_opt = 2\nlow_end_gpu = {low}\n')
|
||||
for low in ('', 'low_end_gpu = 1\n', 'low_end_gpu = yes\n', 'low_end_gpu = 0\n', 'low_end_gpu = off\n',
|
||||
'low_end_gpu = 0 ; note\n'):
|
||||
(out / 'nx2navi.ini').write_text('guest_opt = 2\n' + low)
|
||||
with mock.patch.dict(os.environ, env, clear=True):
|
||||
self.mg.guest_opt_ini(out)
|
||||
self.assertEqual(os.environ.get('NX2NAVI_GUEST_OPT'), '2' if taken else None, low)
|
||||
self.assertEqual(os.environ.get('NX2NAVI_GUEST_OPT'), '2', low)
|
||||
(out / 'nx2navi.ini').write_text('low_end_gpu = 1\n')
|
||||
with mock.patch.dict(os.environ, env, clear=True):
|
||||
self.mg.guest_opt_ini(out)
|
||||
self.assertIsNone(os.environ.get('NX2NAVI_GUEST_OPT')) # no guest_opt line: nothing is set
|
||||
(out / 'nx2navi.ini').write_text('guest_opt = 2\n')
|
||||
with mock.patch.dict(os.environ, dict(env, NX2NAVI_GUEST_OPT='1'), clear=True):
|
||||
self.mg.guest_opt_ini(out)
|
||||
self.assertEqual(os.environ.get('NX2NAVI_GUEST_OPT'), '1') # the environment wins over the file
|
||||
|
||||
def test_cache_from_before_carrying_names_its_translator(self):
|
||||
"""Before a new translator goes beside the game, a shader cache with no identities.txt gets one naming the
|
||||
|
||||
Reference in New Issue
Block a user