src/libANGLE/renderer/vulkan/doc/PresentSemaphores.md


Log

Author Commit Date CI Message
Shahbaz Youssefi 316e6831 2025-08-08T14:14:20 Vulkan: Support KHR versions of surface/swapchain_maint1 They are straight promotions of the EXT versions of the extensions. Bug: angleproject:430106352 Change-Id: I889dfda99d8ad35de1672914e7cc73b2879be6a2 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6832392 Reviewed-by: Amirali Abdolrashidi <abdolrashidi@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Igor Nazarov dbffa5d3 2023-05-30T15:43:45 Vulkan: Update present history logic Keeping old Swapchain's `ImagePresentOperation`s with Fences can lead to multiple "old swapchains" lists. This may cause situations exceeding the `kMaxOldSwapchains` limit. Instead of marking `ImagePresentOperation` as corresponding to an older swapchain, accumulate all present history in the `mOldSwapchains`. Since Fences are only used when VK_EXT_swapchain_maintenance1 is supported, instead of attaching "old swapchains" to the first present operation, they are destroyed when present Fences are signaled in the new `cleanUpOldSwapchains()` method. Also this CL fixes a bug: if (mPresentHistory.empty() || mPresentHistory.back().imageIndex == kInvalidImageIndex) The above condition will always pass when VK_EXT_swapchain_maintenance1 is supported. Bug: angleproject:7847 Change-Id: I1a41944456756b8af740f1903c873823323a2e0b Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4505952 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>
Igor Nazarov 552e7468 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>
Shahbaz Youssefi ffbb65bc 2022-11-28T13:31:48 Vulkan: Use VK_EXT_swapchain_maintenance1 for present fences Bug: angleproject:7878 Change-Id: Ic3a43c663789a6489cff261848d9ad4a408ca53a Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4088905 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Ian Elliott <ianelliott@google.com>
Shahbaz Youssefi 31c40936 2022-11-25T12:28:27 Vulkan: Rework present semaphore recycling Present semaphores and old swapchains are now associated with a fence for clean up. The fence is the one coming from the _next_ acquire of the same image index. See doc/PresentSemaphores.md for more details. Bug: angleproject:7847 Change-Id: I16891ccf6df7ac39d8b17328aac35afc422eede0 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4058286 Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Charlie Lao <cclao@google.com>
Shahbaz Youssefi a7ff7df2 2019-09-03T11:22:21 Vulkan: Improve wording of PresentSemaphores.md Bug: angleproject:3450 Change-Id: Iee5360a7b9cced403c08b7883fa11420e250244f Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1784065 Reviewed-by: Ian Elliott <ianelliott@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Shahbaz Youssefi c3f57231 2019-08-28T15:00:46 Vulkan: revamp present semaphore management See doc/PresentSemaphores.md for details. Bug: angleproject:3450 Bug: angleproject:3670 Change-Id: I52d5bd13a4af25f224d386c9584525c182af6f17 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1776880 Reviewed-by: Tim Van Patten <timvp@google.com> Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>