Always set use_presentation_thread flag in init_platform

Signed-off-by: Iason Paraskevopoulos <iason.paraskevopoulos@arm.com>
Change-Id: I1b917f5287c635dbb00b05607c5a36ce7b11767e
This commit is contained in:
Iason Paraskevopoulos 2021-10-15 13:34:37 +01:00
parent 65c5f1e4f1
commit 5cc3b2f498
2 changed files with 2 additions and 4 deletions

View file

@ -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;
};

View file

@ -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;
}