Commit e7b3fe21 by Jamie Madill Committed by Commit Bot

Context: Release surface first in onDestroy.

This works around a bug in Vulkan where the VertexArrayVk still had resources in use when the Context was being destroyed. An alternative approach is to call finish() from Context::onDestroy, but this seems heavyweight. We might have to adopt something like this eventually though. Bug: angleproject:2389 Change-Id: Id99ca00404972a0b857c0e7e36f37b8ac4fd5c5e Reviewed-on: https://chromium-review.googlesource.com/997743Reviewed-by: 's avatarFrank Henigman <fjhenigman@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Jamie Madill <jmadill@chromium.org>
parent f9176ce5
...@@ -432,6 +432,11 @@ Context::Context(rx::EGLImplFactory *implFactory, ...@@ -432,6 +432,11 @@ Context::Context(rx::EGLImplFactory *implFactory,
egl::Error Context::onDestroy(const egl::Display *display) egl::Error Context::onDestroy(const egl::Display *display)
{ {
// Delete the Surface first to trigger a finish() in Vulkan.
SafeDelete(mSurfacelessFramebuffer);
ANGLE_TRY(releaseSurface(display));
for (auto fence : mFenceNVMap) for (auto fence : mFenceNVMap)
{ {
SafeDelete(fence.second); SafeDelete(fence.second);
...@@ -474,9 +479,6 @@ egl::Error Context::onDestroy(const egl::Display *display) ...@@ -474,9 +479,6 @@ egl::Error Context::onDestroy(const egl::Display *display)
} }
} }
SafeDelete(mSurfacelessFramebuffer);
ANGLE_TRY(releaseSurface(display));
releaseShaderCompiler(); releaseShaderCompiler();
mGLState.reset(this); mGLState.reset(this);
......
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