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
This commit is contained in:
egdaniel 2016-04-11 13:41:51 -07:00 committed by Commit bot
parent c14b978613
commit f4ace41dd9

View File

@ -238,6 +238,7 @@ const GrVkBackendContext* GrVkBackendContext::Create() {
}
GrVkBackendContext::~GrVkBackendContext() {
vkDeviceWaitIdle(fDevice);
vkDestroyDevice(fDevice, nullptr);
fDevice = VK_NULL_HANDLE;
vkDestroyInstance(fInstance, nullptr);