Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #10320 from OatmealDome/macos-headless
VulkanContext: Ensure present queue family is valid before incrementing queueCreateInfoCount
  • Loading branch information
leoetlino committed Jan 1, 2022
2 parents 9a61514 + 9ff7f80 commit 0a62ba9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Core/VideoBackends/Vulkan/VulkanContext.cpp
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0a62ba9

Please sign in to comment.