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>
diff --git a/src/dawn_native/vulkan/DeviceVk.cpp b/src/dawn_native/vulkan/DeviceVk.cpp
index 2f7cbad..d692caa 100644
--- a/src/dawn_native/vulkan/DeviceVk.cpp
+++ b/src/dawn_native/vulkan/DeviceVk.cpp
@@ -845,11 +845,12 @@
                     INJECT_ERROR_OR_RUN(fn.WaitForFences(mVkDevice, 1, &*fence, true, UINT64_MAX),
                                         VK_ERROR_DEVICE_LOST));
             } 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);
-
             mFencesInFlight.pop();
         }
         return {};