vulkan: Actually return the preferred memory format

We were just exiting the loop, but not remembering the index.

Speeds up various memory operations, sometimes by quite a lot.
This commit is contained in:
Benjamin Otte 2024-09-14 23:56:30 +02:00
parent bdee95c32c
commit 3286d9f1b5

View File

@ -1076,7 +1076,10 @@ gsk_vulkan_device_find_allocator (GskVulkanDevice *self,
found = MIN (i, found); found = MIN (i, found);
if ((properties.memoryTypes[i].propertyFlags & desired_flags) == desired_flags) if ((properties.memoryTypes[i].propertyFlags & desired_flags) == desired_flags)
break; {
found = i;
break;
}
} }
g_assert (found < properties.memoryTypeCount); g_assert (found < properties.memoryTypeCount);