mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
vulkan: Reserve 4 images in the swapchain by default
With the previous approach we would spend most of the time waiting for the swapchain to be filled again because it seems the compositor takes care of 2 images at once from time to time. This is not visible in profiles because waiting for a frame is a read/poll/whatever operation that does not take CPU. It's only noticeable because the app becomes less responsive.
This commit is contained in:
parent
e6d104bfa0
commit
7ee4bfd9d6
@ -305,7 +305,7 @@ gdk_vulkan_context_check_swapchain (GdkVulkanContext *context,
|
||||
.pNext = NULL,
|
||||
.flags = 0,
|
||||
.surface = priv->surface,
|
||||
.minImageCount = CLAMP (2,
|
||||
.minImageCount = CLAMP (4,
|
||||
capabilities.minImageCount,
|
||||
capabilities.maxImageCount ? capabilities.maxImageCount : G_MAXUINT32),
|
||||
.imageFormat = priv->image_format.format,
|
||||
|
Loading…
Reference in New Issue
Block a user