Merge pull request #10320 from OatmealDome/macos-headless

VulkanContext: Ensure present queue family is valid before incrementing queueCreateInfoCount
This commit is contained in:
Léo Lam 2022-01-01 02:45:10 +01:00 committed by GitHub
commit 0a62ba9beb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -628,7 +628,8 @@ bool VulkanContext::CreateDevice(VkSurfaceKHR surface, bool enable_validation_la
}};
device_info.queueCreateInfoCount = 1;
if (m_graphics_queue_family_index != m_present_queue_family_index)
if (m_graphics_queue_family_index != m_present_queue_family_index &&
m_present_queue_family_index != queue_family_count)
{
device_info.queueCreateInfoCount = 2;
}