From 277e2977ffb6e46b61bbd5c491310c578e0be3a7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 29 Feb 2016 16:28:12 +0100 Subject: [PATCH] (Vulkan) Add function pointer to vkDestroyDevice --- gfx/common/vulkan_common.c | 3 ++- gfx/common/vulkan_common.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) 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;