Vulkan: Use a separate queue for presenting.

Before this change, we simply fail if the device does not expose one
queue family that supports both graphics and present. Currently this is
fine, since devices tend to lay out their queues in this way. NV, for
instance, tends to have one queue family for all graphics operations and
one more for transfer only. However, it's not a hard requirement, and it
is cheap to use a separate queue, so we might as well.
This commit is contained in:
spxtr
2017-09-04 14:35:53 -07:00
parent 3e47baa40c
commit a5be5a3a76
4 changed files with 79 additions and 34 deletions

View File

@ -352,7 +352,7 @@ void CommandBufferManager::SubmitCommandBuffer(size_t index, VkSemaphore wait_se
&present_image_index,
nullptr};
res = vkQueuePresentKHR(g_vulkan_context->GetGraphicsQueue(), &present_info);
res = vkQueuePresentKHR(g_vulkan_context->GetPresentQueue(), &present_info);
if (res != VK_SUCCESS && res != VK_ERROR_OUT_OF_DATE_KHR && res != VK_SUBOPTIMAL_KHR)
LOG_VULKAN_ERROR(res, "vkQueuePresentKHR failed: ");
}