From 5e26f5cc2a95c8a815ae666293d533697bae010e Mon Sep 17 00:00:00 2001 From: Jeroen Bakker Date: Mon, 31 Mar 2025 12:16:48 +0200 Subject: [PATCH] Vulkan: Reduce lag on certain platforms. After reviewing the locations where `GPU_flush()` are used it doesn't seem to be harmfull to include these for the Vulkan backend as well. Hopefully will save some lag that can happen when submitting one huge render graph. Improved playback of rain_restaurant.blend where frames could be dropped resulting into UI lag. Pull Request: https://projects.blender.org/blender/blender/pulls/136654 --- source/blender/gpu/vulkan/vk_context.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/source/blender/gpu/vulkan/vk_context.cc b/source/blender/gpu/vulkan/vk_context.cc index 99e82cd10a2..bd0ccb8f306 100644 --- a/source/blender/gpu/vulkan/vk_context.cc +++ b/source/blender/gpu/vulkan/vk_context.cc @@ -143,7 +143,10 @@ void VKContext::end_frame() device.orphaned_data.destroy_discarded_resources(device); } -void VKContext::flush() {} +void VKContext::flush() +{ + flush_render_graph(RenderGraphFlushFlags::RENEW_RENDER_GRAPH); +} TimelineValue VKContext::flush_render_graph(RenderGraphFlushFlags flags, VkPipelineStageFlags wait_dst_stage_mask,