mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-17 17:59:58 -04:00
Measure the overlay's frame times where the pictures go out, and keep an early picture back to seven eighths of the recent interval.
The overlay's rate, lows and graph were fed from the game's present calls. With the replay on the submitting thread, work held for an event is replayed with the next frame, so the calls come in uneven steps although each frame costs about the same: 36 and 9 ms apart in turn in a village, a sawtooth in the graph and a 1% low of 14 fps, while the pictures went out 19.7 ms apart on average and changed by 3.9 ms from one to the next. The present thread now reports each picture (perfmon_shown) and the overlay takes its intervals from that; the game's calls are used only where no present thread reports. A picture that arrives early now waits until seven eighths of the recent interval have passed since the one before (vk_backend.c pace_smooth, NX2NAVI_PACE_SMOOTH, on by default; not with frame generation). In that village the change from one picture to the next went from 3.9 to 3.0 ms at 51 fps both ways, in a graveyard from 3.1 to 2.6 ms at 54. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -50,6 +50,8 @@ void perfmon_set_vram_game(float (*used_mb)(void));
|
||||
// A game frame was presented (perf_present, the render thread, only while the overlay is on): the time since the last
|
||||
// one, the render thread's waits of this frame (PERF_N entries, host.h), its replay time and the running count of
|
||||
// texture uploads.
|
||||
// A picture went out (the present thread, vk_backend.c): the overlay's frame times are the intervals between these.
|
||||
void perfmon_shown(uint64_t now_ns);
|
||||
void perfmon_frame(uint64_t now_ns, uint64_t interval_ns, const uint64_t *wait_ns, uint64_t replay_ns,
|
||||
int64_t tex_uploads);
|
||||
// The latest numbers (the overlay, present path).
|
||||
|
||||
Reference in New Issue
Block a user