Commit 86a28b3d by Geoff Lang Committed by Commit Bot

Vulkan: Use the correct context in ImageVk::orphan.

The context used for Image creation was being used during orphaning. This causes problems when the image is created with an external source or when different contexts are used between creation and orphaning. BUG=angleproject:3722 Change-Id: Iee4abd2116c3410efd8fb35722cc956cc6d8a3fa Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1709753Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Commit-Queue: Geoff Lang <geofflang@chromium.org>
parent 833bce72
......@@ -122,6 +122,9 @@ egl::Error ImageVk::initialize(const egl::Display *display)
mImageLayer = 0;
}
// mContext is no longer needed, make sure it's not used by accident.
mContext = nullptr;
return egl::NoError();
}
......@@ -152,8 +155,8 @@ angle::Result ImageVk::orphan(const gl::Context *context, egl::ImageSibling *sib
}
// Grab a fence from the releasing context to know when the image is no longer used
ASSERT(mContext != nullptr);
ContextVk *contextVk = vk::GetImpl(mContext);
ASSERT(context != nullptr);
ContextVk *contextVk = vk::GetImpl(context);
// Flush the context to make sure the fence has been submitted.
ANGLE_TRY(contextVk->flushImpl(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