diff --git a/runtime/boot.c b/runtime/boot.c index abf95c5e..a27f928c 100644 --- a/runtime/boot.c +++ b/runtime/boot.c @@ -324,6 +324,7 @@ void rt_frame_presented(const tex_t *t, uint64_t n) { fflush(stdout); fflush(stderr); 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_pipeline_save(); // no-op without the Vulkan back end prof_write(); rtss_limit_restore(); diff --git a/runtime/gfx_present.c b/runtime/gfx_present.c index 4fafd9cc..411128ae 100644 --- a/runtime/gfx_present.c +++ b/runtime/gfx_present.c @@ -82,6 +82,9 @@ void gfx_window_closed(void) { int restart = plat_cas32(&g_restart, 0, 0) != 0; rt_log("gfx: window closed; %s", restart ? "restarting" : "exiting"); cfg_save(); // a menu change saves 400 ms later on the render thread (option_rows.cpp); closing sooner kept the old file + // The window closed while the boot still built its pipelines: not the driver crash the marker is there to catch. + // Left in place, the next start took it for one and every later start skipped the prebuild (vk_pipeline.c pm_skipped). + vk_pipeline_prewarm_marker_clear(); vk_pipeline_save(); prof_write(); // plat_exit runs no atexit handlers rtss_limit_restore(); // RivaTuner Statistics Server's profile as it was diff --git a/runtime/svc.c b/runtime/svc.c index c980ae6d..ba11e286 100644 --- a/runtime/svc.c +++ b/runtime/svc.c @@ -244,6 +244,7 @@ static void svc_body(Cpu *c, uint32_t imm, uint64_t pc) { char at[160]; rt_log("guest ExitProcess at %s; exiting", ldr_describe(pc, at, sizeof at)); fs_save_flush(); + vk_pipeline_prewarm_marker_clear(); // as the window's close (gfx_present.c gfx_window_closed) vk_pipeline_save(); prof_write(); rtss_limit_restore(); diff --git a/runtime/vk_pipeline.c b/runtime/vk_pipeline.c index b39be85d..3f214ca5 100644 --- a/runtime/vk_pipeline.c +++ b/runtime/vk_pipeline.c @@ -4232,7 +4232,8 @@ static void prewarm_run(void) { // GPU and driver in