Vulkan: ignore errors in shutdown vkWaitForFences.

There is nothing we can do when these errors happen except proceeding
with the clean shutdown of the Vulkan device by destroying all the
fences.

Bug: chromium:1230251
Change-Id: I5f14770bf71072616783afec7cf9538c9b103f23
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/58398
Commit-Queue: Jiawei Shao <jiawei.shao@intel.com>
Auto-Submit: Corentin Wallez <cwallez@chromium.org>
Reviewed-by: Austin Eng <enga@chromium.org>
Reviewed-by: Jiawei Shao <jiawei.shao@intel.com>
This commit is contained in:
Corentin Wallez 2021-07-20 00:26:07 +00:00 committed by Dawn LUCI CQ
parent bdc029ee39
commit ae5be1df34
1 changed files with 4 additions and 3 deletions

View File

@ -845,11 +845,12 @@ namespace dawn_native { namespace vulkan {
INJECT_ERROR_OR_RUN(fn.WaitForFences(mVkDevice, 1, &*fence, true, UINT64_MAX), INJECT_ERROR_OR_RUN(fn.WaitForFences(mVkDevice, 1, &*fence, true, UINT64_MAX),
VK_ERROR_DEVICE_LOST)); VK_ERROR_DEVICE_LOST));
} while (result == VK_TIMEOUT); } while (result == VK_TIMEOUT);
// Ignore errors from vkWaitForFences: it can be either OOM which we can't do anything
// about (and we need to keep going with the destruction of all fences), or device
// loss, which means the workload on the GPU is no longer accessible and we can
// safely destroy the fence.
// TODO: Handle errors
ASSERT(result == VK_SUCCESS);
fn.DestroyFence(mVkDevice, fence, nullptr); fn.DestroyFence(mVkDevice, fence, nullptr);
mFencesInFlight.pop(); mFencesInFlight.pop();
} }
return {}; return {};