Log dynamic resolution's target against the one the log last named, from the start line on.

The review found that dynres.c dynres_frame compared a changed target with a static that started at 0 and outlived a
restart: with fps_limit = display the first refresh-rate wander under 1 % after the start was logged, against the
comment's rule, and after dyn_res off and on a move back to the earlier run's last logged target said nothing, so the
start line and the live lines disagreed. A test of the menu's path found a third case: a limit or dyn_res_target
changed in the menu bumps cfg_version, dynres_read takes the new target first, and dynres_frame, which logged only
when its own reading differed from D.target_ns, never named it. The last logged target now lives in D (logged_ns),
the start line sets it, and dynres_frame logs any move of more than 1 % from it, naming the set target as "as set".
No lock and no wait; the target and the steps are what they were. The review's stale "(dyn_res_target 16.7 in
1..100)" in cfg.c misfit now reads 0..100, as the row's set has been since the commit that changed the default
target.

tests/dynres_check.py gains these cases (a menu limit, a menu target, a wander after the start, the earlier run's
target after off and on); they fail on the old dynres.c and pass. The -Wall compile of dynres.c and cfg.c shows no
warning, and cfg_rows_check reports 0 problems.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-13 19:37:48 -05:00
parent 4fe1339189
commit 1ae00ed802
4 changed files with 50 additions and 12 deletions

View File

@@ -795,9 +795,10 @@ refused, and two images of one frame never evict each other. No GPU, no game fil
A change to dynamic resolution's target or step hold (`runtime/dynres.c`) passes `python tests\dynres_check.py`, which
builds that file with stand-ins for the settings, the GPU's busy time, the clock and the game's rate under the limit:
the default target is the frame time of 60, 144 and 240 fps and 16.7 ms for an unknown or unlimited rate, a target
that is set wins, a limit changed while it runs moves the target with one log line, and each step is held for
`dyn_res_step` 60ths of a second at 60, 144 and 240 fps, down while the GPU is over the target and back up once it is
under three quarters of it. No GPU, no game files.
that is set wins, a limit or target changed while it runs (in the menu too) moves the target with one log line, a
refresh rate wandering under 1 % after the start line logs none, and each step is held for `dyn_res_step` 60ths of a
second at 60, 144 and 240 fps, down while the GPU is over the target and back up once it is under three quarters of
it. No GPU, no game files.
A change to the ASTC decoder's scratch trim (`runtime/vk_astc.c` `vk_astc_scratch_trim`, with the upload lock it only
tries, `runtime/vk_memory.c` `vk_defer_buffer_try`) passes `python tests\astc_trim_check.py`, which builds `vk_astc.c`