Commit 747df7aa authored by Benjamin Otte's avatar Benjamin Otte

vulkan: Also wait on the draw semaphore when present()ing

That way we have a synchronization primitive at the start and at the
end.
parent 3c5b25b1
......@@ -306,6 +306,10 @@ gdk_vulkan_context_end_frame (GdkDrawContext *draw_context,
GDK_VK_CHECK (vkQueuePresentKHR, gdk_vulkan_context_get_queue (context),
&(VkPresentInfoKHR) {
.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR,
.waitSemaphoreCount = 1,
.pWaitSemaphores = (VkSemaphore[]) {
priv->draw_semaphore
},
.swapchainCount = 1,
.pSwapchains = (VkSwapchainKHR[]) {
priv->swapchain
......
......@@ -237,13 +237,17 @@ gsk_vulkan_render_submit (GskVulkanRender *self,
.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO,
.waitSemaphoreCount = 1,
.pWaitSemaphores = (VkSemaphore[1]) {
gdk_vulkan_context_get_draw_semaphore (self->vulkan),
gdk_vulkan_context_get_draw_semaphore (self->vulkan)
},
.pWaitDstStageMask = (VkPipelineStageFlags []) {
VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT,
},
.commandBufferCount = 1,
.pCommandBuffers = &self->command_buffer,
.signalSemaphoreCount = 1,
.pSignalSemaphores = (VkSemaphore[1]) {
gdk_vulkan_context_get_draw_semaphore (self->vulkan)
}
},
fence);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment