From be14adfdc8271b3cd45accc682ec21ba3dd8401e Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Mon, 1 Mar 2021 09:59:33 +0100 Subject: [PATCH] Fix QVulkanWindow on Wayland The Wayland backend needs 4 buffers and is failing when making QVulkanWindow since there was a hardcoded limit at 3. The Vulkan-backend to RHI already has smarter handling of this. We want to limit the changes we do to the "legacy" QVulkanWindow, so we keep the hardcoded max value but increase it to 4 to accommodate the requirements on Wayland. Task-number: QTBUG-91418 Change-Id: I830bc30d1c2eeac1b076c50d35d5d138fd46dace Reviewed-by: Laszlo Agocs --- src/gui/vulkan/qvulkanwindow_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/vulkan/qvulkanwindow_p.h b/src/gui/vulkan/qvulkanwindow_p.h index 4f0d8f606e..de69b5c9b0 100644 --- a/src/gui/vulkan/qvulkanwindow_p.h +++ b/src/gui/vulkan/qvulkanwindow_p.h @@ -126,7 +126,7 @@ public: PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR = nullptr; PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR; - static const int MAX_SWAPCHAIN_BUFFER_COUNT = 3; + static const int MAX_SWAPCHAIN_BUFFER_COUNT = 4; static const int MAX_FRAME_LAG = QVulkanWindow::MAX_CONCURRENT_FRAME_COUNT; // QVulkanWindow only supports the always available FIFO mode. The // rendering thread will get throttled to the presentation rate (vsync).