diff --git a/gfx/common/vulkan_common.c b/gfx/common/vulkan_common.c index 9766c9e2df..27d70a00cc 100644 --- a/gfx/common/vulkan_common.c +++ b/gfx/common/vulkan_common.c @@ -1040,6 +1040,7 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk, VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, GetPhysicalDeviceMemoryProperties); VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, GetPhysicalDeviceQueueFamilyProperties); VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreateDevice); + VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, DestroyDevice); VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, GetDeviceQueue); VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, QueueWaitIdle); VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, QueueSubmit); @@ -1390,7 +1391,7 @@ void vulkan_context_destroy(gfx_ctx_vulkan_data_t *vk, else { if (vk->context.device) - vkDestroyDevice(vk->context.device, NULL); + vk->context.fp.vkDestroyDevice(vk->context.device, NULL); if (vk->context.instance) vkDestroyInstance(vk->context.instance, NULL); } diff --git a/gfx/common/vulkan_common.h b/gfx/common/vulkan_common.h index 7fbee8066f..bfd50f718d 100644 --- a/gfx/common/vulkan_common.h +++ b/gfx/common/vulkan_common.h @@ -151,6 +151,7 @@ typedef struct vulkan_context PFN_vkCmdBindPipeline vkCmdBindPipeline; PFN_vkCmdDraw vkCmdDraw; PFN_vkCreateDevice vkCreateDevice; + PFN_vkDestroyDevice vkDestroyDevice; PFN_vkGetPhysicalDeviceSurfaceSupportKHR vkGetPhysicalDeviceSurfaceSupportKHR; PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR vkGetPhysicalDeviceSurfaceCapabilitiesKHR; PFN_vkGetPhysicalDeviceSurfaceFormatsKHR vkGetPhysicalDeviceSurfaceFormatsKHR;