From 5cc3b2f498f1134203c33ac453333ffac92331e7 Mon Sep 17 00:00:00 2001 From: Iason Paraskevopoulos Date: Fri, 15 Oct 2021 13:34:37 +0100 Subject: [PATCH] Always set use_presentation_thread flag in init_platform Signed-off-by: Iason Paraskevopoulos Change-Id: I1b917f5287c635dbb00b05607c5a36ce7b11767e --- wsi/headless/swapchain.hpp | 1 + wsi/wayland/swapchain.cpp | 5 +---- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/wsi/headless/swapchain.hpp b/wsi/headless/swapchain.hpp index 23bcd09..cdaf792 100644 --- a/wsi/headless/swapchain.hpp +++ b/wsi/headless/swapchain.hpp @@ -59,6 +59,7 @@ protected: VkResult init_platform(VkDevice device, const VkSwapchainCreateInfoKHR *swapchain_create_info, bool &use_presentation_thread) override { + use_presentation_thread = true; return VK_SUCCESS; }; diff --git a/wsi/wayland/swapchain.cpp b/wsi/wayland/swapchain.cpp index 6bf6185..57f2bad 100644 --- a/wsi/wayland/swapchain.cpp +++ b/wsi/wayland/swapchain.cpp @@ -136,10 +136,7 @@ VkResult swapchain::init_platform(VkDevice device, const VkSwapchainCreateInfoKH * initialize the page flip thread so the present_image function can be called * during vkQueuePresent. */ - if (m_present_mode == VK_PRESENT_MODE_MAILBOX_KHR) - { - use_presentation_thread = false; - } + use_presentation_thread = (m_present_mode != VK_PRESENT_MODE_MAILBOX_KHR); return VK_SUCCESS; }