Break the memory report down past VMA, by owner in system memory, and by growth over a session.

Every report adds a line for video memory outside VMA (the driver's usage and budget per heap against VMA's blocks, and counts of pipelines by kind and by last use, stage libraries, compute pipelines, layouts and descriptor pools, with the swapchain, DLSS and FSR sizes), a line that splits the process's commit by owner (the game's heap and maps, device-local memory, VMA's host blocks, the C runtime heap with the shader caches, pipeline tables, texture cache, log queue and flight recorder in it, the driver's pipeline cache data and the rest), and a line naming what grew by more than 64 MiB since the report before and since play began. Every ten minutes of play and at exit a ranking line orders the categories by growth and marks those that only climbed; tests/mem_growth_check.py checks that bookkeeping.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-13 06:46:00 -05:00
parent a74503cd86
commit d9429b0c00
28 changed files with 926 additions and 13 deletions

View File

@@ -329,6 +329,7 @@ void rt_frame_presented(const tex_t *t, uint64_t n) {
input_rumble_hd_stop(); // a controller on HD rumble gets the neutral value before the exit
fs_save_flush();
vk_pipeline_prewarm_marker_clear(); // an orderly end, not a driver crash in the boot's builds (vk_pipeline.c pm_skipped)
vk_mem_exit_log(); // the memory report's ranking of the session
vk_pipeline_save_exit(); // no-op without the Vulkan back end
prof_write();
rtss_limit_restore();