Commit bcccb6c4e5fa07df0ce08acaeb30fd5c13821230

Igor Nazarov 2023-05-30T18:21:06

Vulkan: Minor fix in doDeferredAcquireNextImage() method If call `doDeferredAcquireNextImage()` after `prepareSwap()`, the `prepareForAcquireNextSwapchainImage()` method will be called again, and may possible recreate the Swapchain while there is ANI result that needs processing. In the current code the above is not possible (except if call `prepareSwap` directly from the application side). This may be possible in the future, when ANI is deferred until RenderPass end, that may happen in the `flushImpl()` of the `swapImpl()`. This change skips `prepareForAcquireNextSwapchainImage()` if there is ANI result that needs processing. Additionally, `doDeferredAcquireNextImageWithUsableSwapchain()` call in `swapImpl()` replaced with `doDeferredAcquireNextImage()` for simplicity. Possible call sequences after this change: prepareSwap: prepareForAcquireNextSwapchainImage() doDeferredAcquireNextImageWithUsableSwapchain() or prepareSwap: prepareForAcquireNextSwapchainImage() TryAcquireNextImageUnlocked() other API: doDeferredAcquireNextImage(): // skipped - prepareForAcquireNextSwapchainImage() doDeferredAcquireNextImageWithUsableSwapchain() or other API: doDeferredAcquireNextImage(): prepareForAcquireNextSwapchainImage() doDeferredAcquireNextImageWithUsableSwapchain() Bug: angleproject:6851 Bug: angleproject:8133 Change-Id: I4f973c05821fc9e43769cc2621f4467790118f23 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/4572424 Reviewed-by: Charlie Lao <cclao@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>