Commit dccec125 by Tim Van Patten Committed by Commit Bot

Vulkan: Clear mCurrentGraphicsPipeline after createPipelineLayout()

Set mCurrentGraphicsPipeline = nullptr when the pipeline layout is recreated if immutable samplers are used to prevent a use-after-free. For a fuller discussion on why this is necessary, see: Vulkan: clear mCurrentGraphicsPipeline during invalidate | https://chromium-review.googlesource.com/c/angle/angle/+/2647746 Bug: b/178424566 Bug: angleproject:5624 Change-Id: I70679bda85cd587dbd8893a4576ee5d33aee2b70 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2683041 Commit-Queue: Tim Van Patten <timvp@google.com> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent 393c44f1
...@@ -4221,6 +4221,10 @@ angle::Result ContextVk::updateActiveTextures(const gl::Context *context) ...@@ -4221,6 +4221,10 @@ angle::Result ContextVk::updateActiveTextures(const gl::Context *context)
// will likely affect performance negatively. // will likely affect performance negatively.
ANGLE_TRY(mExecutable->createPipelineLayout(context, &mActiveTextures)); ANGLE_TRY(mExecutable->createPipelineLayout(context, &mActiveTextures));
invalidateCurrentGraphicsPipeline(); invalidateCurrentGraphicsPipeline();
// TODO(http://anglebug.com/5624): rework updateActiveTextures(), createPipelineLayout(),
// and handleDirtyGraphicsPipeline().
mCurrentGraphicsPipeline = nullptr;
} }
return angle::Result::Continue; return angle::Result::Continue;
......
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