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
This commit is contained in:
Jeroen Bakker
2025-07-03 09:55:09 +02:00
parent 5e17f5f41a
commit eeb2dc8a9e

View File

@@ -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();