Commit 0f861bd8 by Geoff Lang Committed by Commit Bot

Vulkan: Don't present on surface destruction.

The the user hasn't called SwapBuffers explicitly, we should not write to the window surface. This is especially a problem when the native window has already been destroyed. BUG=angleproject:2464 Change-Id: Ib4289de471ba2ad10e5cc21a8c2af946642f138c Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1586355Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 3fb957a0
...@@ -354,11 +354,7 @@ void WindowSurfaceVk::destroy(const egl::Display *display) ...@@ -354,11 +354,7 @@ void WindowSurfaceVk::destroy(const egl::Display *display)
RendererVk *renderer = displayVk->getRenderer(); RendererVk *renderer = displayVk->getRenderer();
VkDevice device = renderer->getDevice(); VkDevice device = renderer->getDevice();
VkInstance instance = renderer->getInstance(); VkInstance instance = renderer->getInstance();
bool swapchainOutOfDate;
// Queueing the image for presentation ensures the image is no longer in use when
// we delete the window surface.
(void)present(displayVk, nullptr, 0, swapchainOutOfDate);
// We might not need to flush the pipe here. // We might not need to flush the pipe here.
(void)renderer->finish(displayVk, nullptr, nullptr); (void)renderer->finish(displayVk, nullptr, nullptr);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment