Keep the previous picture on screen instead of showing a frame that lacks draws, and show the game's own VRAM in the overlay.

A draw whose shader or pipeline is still building is left out of its frame, and the frame was shown without it: a black or unlit picture with the interface intact when it was a lighting pass, a light going out, or ground missing for a frame. In a player's session a full-screen draw was skipped after its 50 ms and the frame came out black as a boulder hit.

The frame's present is now left out when draws were skipped (vk_backend.c frame_hold, NX2NAVI_FRAME_HOLD_MS, 120 by default, 0 off). The game runs on, so nothing waits. The hold comes from an allowance that fills again at an eighth of the clock's rate, so a long build or a run of them shows its frames as before and does not freeze the picture; a full-screen draw that would be skipped with the allowance spent waits on instead, 500 ms at most. Not with DLSS Frame Generation.

On a first walk through a village with no pipeline recorded, 21 of the 23 frames with skipped draws were held back; in the Lost Woods, 7 of 8.

The performance overlay: the VRAM line is the card's dedicated memory in use, which counts every program on it: a player read 14.5 GB as the game's while the game held 7.3 GB. The line's third cell now gives what this process holds on the device-local heaps (the driver's budget figure), in place of the GPU clock, which stays where the driver gives no budget.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
epicmeme546
2026-11-10 04:39:19 -05:00
parent 1b9016896a
commit d1bebd34cd
11 changed files with 132 additions and 6 deletions

View File

@@ -145,6 +145,9 @@ static uint8_t g_gpu_luid[8];
static int g_gpu_luid_ok;
static int g_gpu_bus = -1;
static float g_vram_total_mb = -1;
static float (*g_vram_game)(void);
void perfmon_set_vram_game(float (*used_mb)(void)) { __atomic_store_n(&g_vram_game, used_mb, __ATOMIC_RELEASE); }
void perfmon_set_gpu(const char *name, const uint8_t *luid, int pci_bus, float vram_total_mb) {
plat_mutex_lock(&g_lock);
@@ -308,6 +311,7 @@ static void machine_clear(PerfStats *s) {
s->cpu_total_pct = s->cpu_game_pct = s->cpu_temp_c = -1;
s->ram_used_mb = s->ram_total_mb = s->ram_game_mb = -1;
s->gpu_pct = s->gpu_temp_c = s->gpu_power_w = s->gpu_clock_mhz = s->vram_used_mb = s->vram_total_mb = -1;
s->vram_game_mb = -1;
}
static void machine_copy(PerfStats *d, const PerfStats *s) {
@@ -317,6 +321,7 @@ static void machine_copy(PerfStats *d, const PerfStats *s) {
d->ram_used_mb = s->ram_used_mb, d->ram_total_mb = s->ram_total_mb, d->ram_game_mb = s->ram_game_mb;
d->gpu_pct = s->gpu_pct, d->gpu_temp_c = s->gpu_temp_c, d->gpu_power_w = s->gpu_power_w;
d->gpu_clock_mhz = s->gpu_clock_mhz, d->vram_used_mb = s->vram_used_mb, d->vram_total_mb = s->vram_total_mb;
d->vram_game_mb = s->vram_game_mb;
}
static void sampler(void *arg) {
@@ -343,6 +348,8 @@ static void sampler(void *arg) {
plat_mem_info(&s.ram_used_mb, &s.ram_total_mb, &s.ram_game_mb);
plat_gpu_load(l, &s.gpu_pct, &s.vram_used_mb);
s.vram_total_mb = vram_total;
float (*game)(void) = __atomic_load_n(&g_vram_game, __ATOMIC_ACQUIRE);
if (game) s.vram_game_mb = game();
nvml_sample(&s);
adl_sample(&s);
plat_mutex_lock(&g_lock);