summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2017-11-16 09:07:58 -0800
committerJason Ekstrand <[email protected]>2017-12-04 10:04:19 -0800
commit59e58c348e6af16a5f2ddb3dd2dcfcef116471a4 (patch)
tree86a1037d14949cc0748e2b18b61f4ab280cb4e5f /src
parentb91a1953e81ef502d61a9ae2a01ec531a1cfa537 (diff)
vulkan/wsi: Only wait on semaphores on the first swapchain
Reviewed-by: Dave Airlie <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/vulkan/wsi/wsi_common.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/vulkan/wsi/wsi_common.c b/src/vulkan/wsi/wsi_common.c
index f149846e454..4f6648f988f 100644
--- a/src/vulkan/wsi/wsi_common.c
+++ b/src/vulkan/wsi/wsi_common.c
@@ -541,9 +541,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;