mirror of
https://github.com/Tencent/ncnn.git
synced 2026-10-26 02:46:47 +08:00
reclaim immediately after submitting, so we don't block the queue access during the long-time waiting fence, fix #1682
This commit is contained in:
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user