Browse Source

reclaim immediately after submitting, so we don't block the queue access during the long-time waiting fence, fix #1682

tags/20200413
nihuini 6 years ago
parent
commit
1469bc8b19
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/command.cpp

+ 2
- 2
src/command.cpp View File

@@ -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;
}



Loading…
Cancel
Save