Commit 16944ed2 by Jamie Madill Committed by Commit Bot

Vulkan: Fix ASSERT that could be triggered on some swaps.

Unclear why this wasn't reproducing on our integrated tests. Seems to affect most Vulkan tests. Regression likely introduced with the multithreading code. Bug: angleproject:2464 Change-Id: I62a0c1a4f5e5bf63efdef2a979d9b2efb6a1ea81 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1864314 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent a0b064d0
...@@ -269,7 +269,11 @@ angle::Result CommandQueue::checkCompletedCommands(vk::Context *context) ...@@ -269,7 +269,11 @@ angle::Result CommandQueue::checkCompletedCommands(vk::Context *context)
++finishedCount; ++finishedCount;
} }
mInFlightCommands.erase(mInFlightCommands.begin(), mInFlightCommands.begin() + finishedCount); if (finishedCount > 0)
{
auto beginIter = mInFlightCommands.begin();
mInFlightCommands.erase(beginIter, beginIter + finishedCount);
}
Serial lastCompleted = renderer->getLastCompletedQueueSerial(); Serial lastCompleted = renderer->getLastCompletedQueueSerial();
......
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