Commit 1287e19e802ae2af651cd74ff1adaf9efe453146

Igor Nazarov 2024-12-13T15:28:59

Vulkan: Further improve recreateSwapchain() error handling Fixed problem in cases if something fails after assigning `mSwapchain = newSwapChain` and before setting `mAcquireOperation.state = impl::ImageAcquireState::NeedToAcquire`. In the above case we will already have `mSwapchain` pointer with potentially undefined state of related members, while `mAcquireOperation.state` may remain `NeedToProcess`. Returning in case of a failure without assigning `mSwapchain` we will stay in the "invalid swapchain" state while still have new swapchain in the `mLastSwapchain`. This state is already handled by existing code and will try to call `recreateSwapchain()` again until it succeeds. Bug: angleproject:380234227 Change-Id: I465115deef4c06f35d40b90efc192b51e7b9fd44 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6089081 Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: Charlie Lao <cclao@google.com> Commit-Queue: Igor Nazarov <i.nazarov@samsung.com>