Commit 552e7468f6872f430f6c65b407048befbb517ce4

Igor Nazarov 2023-05-26T18:39:55

Vulkan: Do not use ANI Fence in present semaphore recycling Fences from `vkAcquireNextImageKHR()` has many problems on some Intel drivers, and one of them does not have a workaround. Instead of using ANI Fence, this change will use `swapSerial`, that has execution dependency on ANI semaphore. As result, semaphore recycling will be delayed a little longer, until the Device finises rendering to the image. On practice, this will not significantly affect the total number of allocated semaphores. As a bonus, this change also fixes a bug with Shared Present Mode: Current logic assumes that PE will only signal image's ANI fence after waiting on previous present semaphore with this image. In reality, PE returns same image index and fence that is always signaled. Additionally, ANI call is not required at all. There is no 100% safe solution when not using: VkSwapchainPresentFenceInfoEXT This CL will recycle present semaphores only after next present semaphore is signaled. This not only ensures, that present semaphores are not reused inflight, but also gives time to PE to finish waiting on the semaphore until next present. Bug: angleproject:8155 Bug: angleproject:7847 Change-Id: Ia112190d77ea7e04f8f9755cf56f5387744dc599 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4572426 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>