Update workaround for devices with broken vkQueueWaitIdle.
This is essentially just changing how we do a workaround we
already have in the code. It also does it in release.
Change-Id: I53b6539beb3e919497f2a13f583108ec10f1b9af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/368556
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/vk/GrVkCommandBuffer.cpp b/src/gpu/vk/GrVkCommandBuffer.cpp
index a886877..06a19f1 100644
--- a/src/gpu/vk/GrVkCommandBuffer.cpp
+++ b/src/gpu/vk/GrVkCommandBuffer.cpp
@@ -646,7 +646,9 @@
}
void GrVkPrimaryCommandBuffer::forceSync(GrVkGpu* gpu) {
- SkASSERT(fSubmitFence != VK_NULL_HANDLE);
+ if (fSubmitFence == VK_NULL_HANDLE) {
+ return;
+ }
GR_VK_CALL_ERRCHECK(gpu, WaitForFences(gpu->device(), 1, &fSubmitFence, true, UINT64_MAX));
}