VulkanRenderer: Fix transfer queue choice

This commit is contained in:
Lynix 2017-09-16 10:35:30 +02:00
parent 596d65f1ed
commit 8a55888ada
1 changed files with 3 additions and 4 deletions

View File

@ -244,15 +244,14 @@ namespace Nz
if (queueFamilies[i].queueFlags & VK_QUEUE_GRAPHICS_BIT) if (queueFamilies[i].queueFlags & VK_QUEUE_GRAPHICS_BIT)
{ {
if (graphicsQueueNodeIndex == UINT32_MAX)
graphicsQueueNodeIndex = i;
if (supportPresentation) if (supportPresentation)
{ {
graphicsQueueNodeIndex = i; graphicsQueueNodeIndex = i;
presentQueueNodeIndex = i; presentQueueNodeIndex = i;
break; break;
} }
else if (graphicsQueueNodeIndex == UINT32_MAX)
graphicsQueueNodeIndex = i;
} }
else if (supportPresentation) else if (supportPresentation)
presentQueueNodeIndex = i; presentQueueNodeIndex = i;
@ -260,7 +259,7 @@ namespace Nz
for (UInt32 i = 0; i < queueFamilies.size(); i++) 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; transfertQueueNodeFamily = i;
if (transfertQueueNodeFamily != graphicsQueueNodeIndex) if (transfertQueueNodeFamily != graphicsQueueNodeIndex)