From f35f402edfd8ed943d68cbc8eaf70469ca31ad4e Mon Sep 17 00:00:00 2001 From: Benau Date: Sun, 13 Mar 2022 10:54:35 +0800 Subject: [PATCH] Fix VkDeviceQueueCreateInfo warning --- lib/graphics_engine/src/ge_vulkan_driver.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/graphics_engine/src/ge_vulkan_driver.cpp b/lib/graphics_engine/src/ge_vulkan_driver.cpp index 8d908cd52..14c5fdea6 100644 --- a/lib/graphics_engine/src/ge_vulkan_driver.cpp +++ b/lib/graphics_engine/src/ge_vulkan_driver.cpp @@ -687,8 +687,11 @@ void GEVulkanDriver::createDevice() queue_create_info.pQueuePriorities = &queue_priority; queue_create_infos.push_back(queue_create_info); - queue_create_info.queueFamilyIndex = m_present_family; - queue_create_infos.push_back(queue_create_info); + if (m_present_family != m_graphics_family) + { + queue_create_info.queueFamilyIndex = m_present_family; + queue_create_infos.push_back(queue_create_info); + } VkPhysicalDeviceFeatures device_features = {}; if (m_features.samplerAnisotropy == VK_TRUE)