From 9ff7f80aa0a8e793ebf4772c53208ca8cfb89609 Mon Sep 17 00:00:00 2001 From: OatmealDome Date: Tue, 28 Dec 2021 21:18:47 -0500 Subject: [PATCH] VulkanContext: Ensure present queue family is valid before incrementing queueCreateInfoCount --- Source/Core/VideoBackends/Vulkan/VulkanContext.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp index ead13df547..40e5429956 100644 --- a/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp +++ b/Source/Core/VideoBackends/Vulkan/VulkanContext.cpp @@ -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; }