Skip to content

Commit

Permalink
Vulkan: Fix segv referencing contextVk
Browse files Browse the repository at this point in the history
Tests dEQP-EGL.functional.fence_sync.* can cause SyncHelper::clientWait
to be called with a null contextVk which we were trying to deference to
get to the renderer. We have a pointer to the renderer already so just
use that.

Bug: b/154030730
Change-Id: If64ec2c960f39b893d2e47a11638d16f830aecfd
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2493181
Commit-Queue: Shahbaz Youssefi <syoussefi@chromium.org>
Reviewed-by: Tim Van Patten <timvp@google.com>
Reviewed-by: Shahbaz Youssefi <syoussefi@chromium.org>
  • Loading branch information
courtney-g authored and Commit Bot committed Oct 23, 2020
1 parent e89c8f7 commit 097f307
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/libANGLE/renderer/vulkan/SyncVk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ angle::Result SyncHelper::clientWait(Context *context,

// If we are using worker need to wait for the commands to be issued before waiting on the
// fence.
if (contextVk->getRenderer()->getFeatures().enableCommandProcessingThread.enabled)
if (renderer->getFeatures().enableCommandProcessingThread.enabled)
{
contextVk->getRenderer()->waitForCommandProcessorIdle(contextVk);
renderer->waitForCommandProcessorIdle(contextVk);
}

// Wait on the fence that's expected to be signaled on the first vkQueueSubmit after
Expand Down

0 comments on commit 097f307

Please sign in to comment.