mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 10:20:07 +00:00
vulkan: Set VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT
It seems Mesa doesn't support that yet, but having it doesn't hurt. And it allows drivers to allocate less memory for the swapchains, because we don't need all the 4 images we request in minImageCount. But drivers tend to take that minimum image count as gospel, so we need to use a higher number to not cause lag in corner cases.
This commit is contained in:
parent
6c72a223f5
commit
ffae0010c4
@ -467,8 +467,9 @@ gdk_vulkan_context_check_swapchain (GdkVulkanContext *context,
|
||||
res = GDK_VK_CHECK (vkCreateSwapchainKHR, device,
|
||||
&(VkSwapchainCreateInfoKHR) {
|
||||
.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR,
|
||||
.pNext = NULL,
|
||||
.flags = 0,
|
||||
.flags =
|
||||
(gdk_vulkan_context_has_feature (context, GDK_VULKAN_FEATURE_SWAPCHAIN_MAINTENANCE) ?
|
||||
VK_SWAPCHAIN_CREATE_DEFERRED_MEMORY_ALLOCATION_BIT_EXT : 0),
|
||||
.surface = priv->surface,
|
||||
.minImageCount = CLAMP (4,
|
||||
capabilities.minImageCount,
|
||||
|
Loading…
Reference in New Issue
Block a user