Commit a8b81590dbea3ed0542c0e9b77766c488a935be5

Tim Van Patten 2019-02-15T17:23:23

Vulkan: Free semaphores with other in flight resources ANGLE calls WindowSurfaceVk::nextSwapchainImage() to prepare for the next frame, which allocates an image (and other resources, like semaphore). However, it's possible for egl::Display::destroySurface() to be called before the next submitFrame(), which prevents the image from being returned back to the swapchain. This fix refactors swapImpl() to separate out the present work, which can be called as part of destroy() to return the allocated resources. dEQP-EGL.functional.query_context.get_current_context.* dEQP-EGL.functional.query_context.get_current_display.* dEQP-EGL.functional.query_context.get_current_surface.r* dEQP-EGL.functional.query_context.query_context.* Bug: angleproject:3057 Change-Id: Ia943f2530e4f27d1a10ee907e810f0bbdb3bfa9a Reviewed-on: https://chromium-review.googlesource.com/c/1474601 Reviewed-by: Ian Elliott <ianelliott@google.com> Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>