[Bf-blender-cvs] [6ccd38ea904] temp-ghost-vulkan: GHOST: Vulkan swapbuffer should wait for graphics queue idling.
Jeroen Bakker
noreply at git.blender.org
Fri Nov 18 11:45:32 CET 2022
Commit: 6ccd38ea904218c0f2f9b68c927733ce71dddaaf
Author: Jeroen Bakker
Date: Fri Nov 18 11:35:12 2022 +0100
Branches: temp-ghost-vulkan
https://developer.blender.org/rB6ccd38ea904218c0f2f9b68c927733ce71dddaaf
GHOST: Vulkan swapbuffer should wait for graphics queue idling.
===================================================================
M intern/ghost/intern/GHOST_ContextVK.cpp
===================================================================
diff --git a/intern/ghost/intern/GHOST_ContextVK.cpp b/intern/ghost/intern/GHOST_ContextVK.cpp
index 9a226dc9e61..9ef541b590f 100644
--- a/intern/ghost/intern/GHOST_ContextVK.cpp
+++ b/intern/ghost/intern/GHOST_ContextVK.cpp
@@ -253,6 +253,11 @@ GHOST_TSuccess GHOST_ContextVK::swapBuffers()
vkResetFences(m_device, 1, &m_in_flight_fences[m_currentFrame]);
VK_CHECK(vkQueueSubmit(m_graphic_queue, 1, &submit_info, m_in_flight_fences[m_currentFrame]));
+ do {
+ result = vkWaitForFences(m_device, 1, &m_in_flight_fences[m_currentFrame], VK_TRUE, 10000);
+ } while (result == VK_TIMEOUT);
+
+ VK_CHECK(vkQueueWaitIdle(m_graphic_queue));
VkPresentInfoKHR present_info{};
present_info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
More information about the Bf-blender-cvs
mailing list