Index: src/gpu/vk/GrVkGpu.cpp |
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp |
index 96c74ddd5dc1df2217723b50877adb93baec072d..0666f10f7e200cc421a77616cf43f575d1cb8bae 100644 |
--- a/src/gpu/vk/GrVkGpu.cpp |
+++ b/src/gpu/vk/GrVkGpu.cpp |
@@ -356,9 +356,11 @@ GrVkGpu::~GrVkGpu() { |
fCurrentCmdBuffer->unref(this); |
// wait for all commands to finish |
+ fResourceProvider.checkCommandBuffers(); |
VkResult res = VK_CALL(QueueWaitIdle(fQueue)); |
- SkASSERT(res == VK_SUCCESS); |
- |
+ // VK_ERROR_DEVICE_LOST is acceptable when tearing down (see 4.2.4 in spec) |
+ SkASSERT(VK_SUCCESS == res || VK_ERROR_DEVICE_LOST == res); |
+ |
// must call this just before we destroy the VkDevice |
fResourceProvider.destroyResources(); |