Commit 783936149f1daa24283465e4f8e79802d164187b

Ian Elliott 2021-09-21T19:14:15

Vulkan: Fixed bugs about VK_SUBOPTIMAL_KHR Image Acquire result This change fixes the following bugs in rx::WindowSurfaceVk with VK_SUBOPTIMAL_KHR Image Acquire result: - Bug in acquireNextSwapchainImage() method: - If VK_SUBOPTIMAL_KHR returned from vkAcquireNextImageKHR(), the method simply returns since the result, and vk::DeviceScoped<vk::Semaphore> acquireImageSemaphore, will be destroyed. However, acquireImageSemaphore can't be destroyed because it is already used by the Presentation Engine. - Bug in initializeImpl() method: - Method allows VK_SUBOPTIMAL_KHR as successful result. However, acquireNextSwapchainImage() will not finish, leaving incomplete state. Attempting to use the framebufer will cause ASSERT/Crash. Solution: - Changed acquireNextSwapchainImage() method to ignore VK_SUBOPTIMAL_KHR result. - Remove checks for VK_SUBOPTIMAL_KHR from Acquire in other places. This solution was chosen, because it is simplest, and VK_SUBOPTIMAL_KHR is properly handled in the computePresentOutOfDate() method. Patch authored by Igor Nazarov <i.nazarov@samsung.com> Bug: angleproject:6401 Change-Id: I90bef7871c3bdcf28240a034927d5b2c705f4367 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/3174729 Commit-Queue: Ian Elliott <ianelliott@google.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>