forked from AuroraMiddleware/gtk
vulkan: Also wait on the draw semaphore when present()ing
That way we have a synchronization primitive at the start and at the end.
This commit is contained in:
parent
3c5b25b1d1
commit
747df7aa3c
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user