[Mesa-dev] [PATCH 16/28] vulkan/wsi: Only wait on semaphores on the first swapchain

Jason Ekstrand jason at jlekstrand.net
Thu Nov 16 21:29:04 UTC 2017


---
 src/vulkan/wsi/wsi_common.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c
index 322f19b..4f92427 100644
--- a/src/vulkan/wsi/wsi_common.c
+++ b/src/vulkan/wsi/wsi_common.c
@@ -532,9 +532,14 @@ wsi_common_queue_present(const struct wsi_device *wsi,
       VkSubmitInfo submit_info = {
          .sType = VK_STRUCTURE_TYPE_SUBMIT_INFO,
          .pNext = NULL,
-         .waitSemaphoreCount = pPresentInfo->waitSemaphoreCount,
-         .pWaitSemaphores = pPresentInfo->pWaitSemaphores,
       };
+      if (i == 0) {
+         /* We only need/want to wait on semaphores once.  After that, we're
+          * guaranteed ordering since it all happens on the same queue.
+          */
+         submit_info.waitSemaphoreCount = pPresentInfo->waitSemaphoreCount,
+         submit_info.pWaitSemaphores = pPresentInfo->pWaitSemaphores,
+      }
       result = wsi->QueueSubmit(queue, 1, &submit_info, swapchain->fences[0]);
       if (result != VK_SUCCESS)
          goto fail_present;
-- 
2.5.0.400.gff86faf



More information about the mesa-dev mailing list