From f4ace41dd9590944c9d4f9e3d1c576914db7af18 Mon Sep 17 00:00:00 2001 From: egdaniel Date: Mon, 11 Apr 2016 13:41:51 -0700 Subject: [PATCH] Wait for all device work to finish before destroy VkDevice Currently before destroying the GrVkGpu, we do wait on all queue work to finish before destroying objects there. Since we only have one queue, the vkDeviceWaitIdle added here is probably not necessary, but the spec does suggest having it just to make sure all work is fully done on the device. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1876863004 Review URL: https://codereview.chromium.org/1876863004 --- src/gpu/vk/GrVkBackendContext.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gpu/vk/GrVkBackendContext.cpp b/src/gpu/vk/GrVkBackendContext.cpp index 9506da5546..f5cd08ca8b 100644 --- a/src/gpu/vk/GrVkBackendContext.cpp +++ b/src/gpu/vk/GrVkBackendContext.cpp @@ -238,6 +238,7 @@ const GrVkBackendContext* GrVkBackendContext::Create() { } GrVkBackendContext::~GrVkBackendContext() { + vkDeviceWaitIdle(fDevice); vkDestroyDevice(fDevice, nullptr); fDevice = VK_NULL_HANDLE; vkDestroyInstance(fInstance, nullptr);