Fallback to regular-priority queue when vkCreateDevice fails
This commit is contained in:
parent
56a799827d
commit
73ce5a440a
1 changed files with 7 additions and 0 deletions
|
@ -876,6 +876,13 @@ bool CVulkanDevice::createDevice()
|
||||||
};
|
};
|
||||||
|
|
||||||
VkResult res = vk.CreateDevice(physDev(), &deviceCreateInfo, nullptr, &m_device);
|
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 )
|
if ( res != VK_SUCCESS )
|
||||||
{
|
{
|
||||||
vk_errorf( res, "vkCreateDevice failed" );
|
vk_errorf( res, "vkCreateDevice failed" );
|
||||||
|
|
Loading…
Reference in a new issue