Commit d5f93dca authored by Vasiliy Telezhnikov's avatar Vasiliy Telezhnikov Committed by Commit Bot

Vulkan: Don't wait for destroyed fences

If while checking for fences we get VK_DEVICE_LOST_ERROR we perform
cleanup by calling vkWaitForDeviceIdle and calling all cleanup callbacks
and destroying fences. All destroyed fences should be considered as
passed after this point to avoid waiting on them.

This is speculative fix for gpu process hangs.

Bug: 1062731
Change-Id: I18253126e646158735e813e72a143969717db6fd
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2108915Reviewed-by: default avatarPeng Huang <penghuang@chromium.org>
Commit-Queue: Vasiliy Telezhnikov <vasilyt@chromium.org>
Cr-Commit-Position: refs/heads/master@{#751657}
parent 9f9de88b
......@@ -241,8 +241,10 @@ void VulkanFenceHelper::PerformImmediateCleanup() {
// recover from this.
CHECK(result == VK_SUCCESS || result == VK_ERROR_DEVICE_LOST);
bool device_lost = result == VK_ERROR_DEVICE_LOST;
if (!device_lost)
current_generation_ = next_generation_ - 1;
// We're going to destroy all fences below, so we should consider them as
// passed.
current_generation_ = next_generation_ - 1;
// Run all cleanup tasks. Create a temporary vector of tasks to run to avoid
// reentrancy issues.
......
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