Fallback to regular-priority queue when vkCreateDevice fails

This commit is contained in:
Joe Dight 2023-05-23 12:49:22 +01:00 committed by Simon Ser
parent 56a799827d
commit 73ce5a440a

View file

@ -876,6 +876,13 @@ bool CVulkanDevice::createDevice()
};
VkResult res = vk.CreateDevice(physDev(), &deviceCreateInfo, nullptr, &m_device);
if ( res == VK_ERROR_NOT_PERMITTED_KHR && g_bNiceCap )
{
fprintf(stderr, "vkCreateDevice failed with a high-priority queue. Falling back to regular priority.\n");
queueCreateInfo.pNext = nullptr;
res = vk.CreateDevice(physDev(), &deviceCreateInfo, nullptr, &m_device);
}
if ( res != VK_SUCCESS )
{
vk_errorf( res, "vkCreateDevice failed" );