[gtk+] vulkan: Create required number of swapchain images
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] vulkan: Create required number of swapchain images
- Date: Wed, 4 Jan 2017 17:41:00 +0000 (UTC)
commit f74490739f1016e5b6696cbf68c8528b0ff00525
Author: Benjamin Otte <otte redhat com>
Date: Wed Jan 4 18:38:40 2017 +0100
vulkan: Create required number of swapchain images
Wayland has minImageCount == 4, so us just creating 2 images is not very
nice. So we don't do that anymore.
gdk/gdkvulkancontext.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gdk/gdkvulkancontext.c b/gdk/gdkvulkancontext.c
index dae6a34..c08356b 100644
--- a/gdk/gdkvulkancontext.c
+++ b/gdk/gdkvulkancontext.c
@@ -235,7 +235,9 @@ gdk_vulkan_context_check_swapchain (GdkVulkanContext *context,
.pNext = NULL,
.flags = 0,
.surface = priv->surface,
- .minImageCount = 2,
+ .minImageCount = CLAMP (2,
+ capabilities.minImageCount,
+ capabilities.maxImageCount ?
capabilities.maxImageCount : G_MAXUINT32),
.imageFormat = priv->image_format.format,
.imageColorSpace = priv->image_format.colorSpace,
.imageExtent = capabilities.currentExtent,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]