From 8a55888adaccb1afa91017c07fff99516fe3b897 Mon Sep 17 00:00:00 2001 From: Lynix Date: Sat, 16 Sep 2017 10:35:30 +0200 Subject: [PATCH] VulkanRenderer: Fix transfer queue choice --- src/Nazara/VulkanRenderer/Vulkan.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/Nazara/VulkanRenderer/Vulkan.cpp b/src/Nazara/VulkanRenderer/Vulkan.cpp index ffc9eefc8..17a1171ec 100644 --- a/src/Nazara/VulkanRenderer/Vulkan.cpp +++ b/src/Nazara/VulkanRenderer/Vulkan.cpp @@ -244,15 +244,14 @@ namespace Nz if (queueFamilies[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) { - if (graphicsQueueNodeIndex == UINT32_MAX) - graphicsQueueNodeIndex = i; - if (supportPresentation) { graphicsQueueNodeIndex = i; presentQueueNodeIndex = i; break; } + else if (graphicsQueueNodeIndex == UINT32_MAX) + graphicsQueueNodeIndex = i; } else if (supportPresentation) presentQueueNodeIndex = i; @@ -260,7 +259,7 @@ namespace Nz for (UInt32 i = 0; i < queueFamilies.size(); i++) { - if (queueFamilies[i].queueFlags & VK_QUEUE_TRANSFER_BIT) + if (queueFamilies[i].queueFlags & (VK_QUEUE_COMPUTE_BIT | VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_TRANSFER_BIT)) //< Compute and graphics queue implicitly support transfer operations { transfertQueueNodeFamily = i; if (transfertQueueNodeFamily != graphicsQueueNodeIndex)