From 1469bc8b19b83d44206f36abfa3dc7377feeef69 Mon Sep 17 00:00:00 2001 From: nihuini Date: Thu, 9 Apr 2020 13:06:42 +0800 Subject: [PATCH] reclaim immediately after submitting, so we don't block the queue access during the long-time waiting fence, fix #1682 --- src/command.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/command.cpp b/src/command.cpp index b76e01cdb..c2103a571 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -152,18 +152,18 @@ int Command::queue_submit_and_wait_fence() } } + vkdev->reclaim_queue(queue_family_index, queue); + // fprintf(stderr, "==================== wait\n"); { VkResult ret = vkWaitForFences(vkdev->vkdevice(), 1, &fence, VK_TRUE, UINT64_MAX); if (ret != VK_SUCCESS) { fprintf(stderr, "vkWaitForFences failed %d\n", ret); - vkdev->reclaim_queue(queue_family_index, queue); return -1; } } - vkdev->reclaim_queue(queue_family_index, queue); return 0; }