From eeb2dc8a9eb4e65c4fc3996a013fc80d6f07cc75 Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Thu, 3 Jul 2025 09:55:09 +0200 Subject: [PATCH] Fix #141305: Vulkan: Animation player memory leak When playing back render result a separate process is started for playback. This process didn't call the GPU_context_frame_begin/end functions resulting in post-poning destroying discarded resources until the playback process was 'exited'. Pull Request: https://projects.blender.org/blender/blender/pulls/141376 --- source/blender/windowmanager/intern/wm_playanim.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/windowmanager/intern/wm_playanim.cc b/source/blender/windowmanager/intern/wm_playanim.cc index a120f0155a6..1143624f9fb 100644 --- a/source/blender/windowmanager/intern/wm_playanim.cc +++ b/source/blender/windowmanager/intern/wm_playanim.cc @@ -675,6 +675,7 @@ static void playanim_toscreen_ex(GhostData &ghost_data, GPUContext *restore_context = GPU_context_active_get(); GPU_context_active_set(ghost_data.gpu_context); + GPU_context_begin_frame(ghost_data.gpu_context); GPU_clear_color(0.1f, 0.1f, 0.1f, 0.0f); @@ -781,6 +782,7 @@ static void playanim_toscreen_ex(GhostData &ghost_data, GPU_flush(); } + GPU_context_end_frame(ghost_data.gpu_context); GHOST_SwapWindowBuffers(ghost_data.window); GPU_context_active_set(restore_context); GPU_render_end();