From 2d34c0a8bcd5dfe93ecc3df1ddf6f656711af35d Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Mon, 21 Mar 2016 00:02:59 -0700 Subject: [PATCH] Vulkan: Free anything pending before the device. This includes, for example, device memory and etc. --- Common/Vulkan/VulkanContext.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Common/Vulkan/VulkanContext.cpp b/Common/Vulkan/VulkanContext.cpp index 5fb745b513..a117dac02b 100644 --- a/Common/Vulkan/VulkanContext.cpp +++ b/Common/Vulkan/VulkanContext.cpp @@ -1240,12 +1240,14 @@ void VulkanContext::DestroyFramebuffers() { } void VulkanContext::DestroySurfaceRenderPass() { - vkDestroyRenderPass(device_, surface_render_pass_, NULL); + vkDestroyRenderPass(device_, surface_render_pass_, NULL); surface_render_pass_ = NULL; } void VulkanContext::DestroyDevice() { - vkDestroyDevice(device_, NULL); + // If there happen to be any pending deletes, now is a good time. + Delete().PerformDeletes(device_); + vkDestroyDevice(device_, NULL); device_ = NULL; }