Commit bb766000 by Tim Van Patten Committed by Commit Bot

Vulkan: Move Flush during SyncHelper::clientWait() earlier

The checks and call to contextVk->flushImpl() needs to be moved before the timeout check to ensure that the vkEvent is flushed to HW eventually when the caller is waiting on it, even if they don't specify a timeout. Bug: chromium:1060139 Test: CopyOutputScalingPixelTest.ScaledCopyOfDrawnFrame/48 Change-Id: I725ea492aaf21e291fe3e5b9ae11ea009e59e019 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/2640423 Commit-Queue: Alexis Hétu <sugoi@chromium.org> Reviewed-by: 's avatarShahbaz Youssefi <syoussefi@chromium.org> Reviewed-by: 's avatarAlexis Hétu <sugoi@chromium.org>
parent f0286e63
......@@ -137,13 +137,6 @@ angle::Result SyncHelper::clientWait(Context *context,
return angle::Result::Continue;
}
// If timeout is zero, there's no need to wait, so return timeout already.
if (timeout == 0)
{
*outResult = VK_TIMEOUT;
return angle::Result::Continue;
}
// We defer (ignore) flushes, so it's possible that the glFence's signal operation is pending
// submission.
if ((flushCommands && contextVk) || usedInRecordedCommands())
......@@ -151,6 +144,13 @@ angle::Result SyncHelper::clientWait(Context *context,
ANGLE_TRY(contextVk->flushImpl(nullptr));
}
// If timeout is zero, there's no need to wait, so return timeout already.
if (timeout == 0)
{
*outResult = VK_TIMEOUT;
return angle::Result::Continue;
}
ASSERT(mUse.getSerial().valid());
VkResult status = VK_SUCCESS;
......
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