[gtk+/wip/otte/vulkan: 44/62] vulkan: Also wait on the draw semaphore when present()ing
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/otte/vulkan: 44/62] vulkan: Also wait on the draw semaphore when present()ing
- Date: Fri, 9 Dec 2016 17:38:38 +0000 (UTC)
commit 747df7aa3cc1cc3d97edd0d097556d4d79116f9e
Author: Benjamin Otte <otte redhat com>
Date: Thu Dec 8 17:40:07 2016 +0100
vulkan: Also wait on the draw semaphore when present()ing
That way we have a synchronization primitive at the start and at the
end.
gdk/gdkvulkancontext.c | 4 ++++
gsk/gskvulkanrender.c | 6 +++++-
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkvulkancontext.c b/gdk/gdkvulkancontext.c
index f0af29b..399cd98 100644
--- a/gdk/gdkvulkancontext.c
+++ b/gdk/gdkvulkancontext.c
@@ -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
diff --git a/gsk/gskvulkanrender.c b/gsk/gskvulkanrender.c
index c57e701..8fd9160 100644
--- a/gsk/gskvulkanrender.c
+++ b/gsk/gskvulkanrender.c
@@ -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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]