[gtk] vulkan: Reserve 4 images in the swapchain by default



commit 7ee4bfd9d6add17d3ab3fbc24ae53d4a11efee88
Author: Benjamin Otte <otte redhat com>
Date:   Thu Mar 29 04:56:07 2018 +0200

    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.

 gdk/gdkvulkancontext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gdk/gdkvulkancontext.c b/gdk/gdkvulkancontext.c
index ba2c44b5c9..b9c24dcbe8 100644
--- a/gdk/gdkvulkancontext.c
+++ b/gdk/gdkvulkancontext.c
@@ -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,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]