From 1fbac78e35e8b0b56e693389ee4e4496ce90b5ac Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 29 Feb 2016 22:38:58 +0100 Subject: [PATCH] (Vulkan) Go through function pointer for vkDestroyPipelineCache --- gfx/common/vulkan_common.c | 7 ++++++- gfx/common/vulkan_common.h | 1 + gfx/drivers/vulkan.c | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/gfx/common/vulkan_common.c b/gfx/common/vulkan_common.c index 73bc060717..1c48a340f9 100644 --- a/gfx/common/vulkan_common.c +++ b/gfx/common/vulkan_common.c @@ -1177,10 +1177,15 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk, VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, DestroyRenderPass); /* Pipelines */ + VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, DestroyPipeline); + + /* Pipeline Layouts */ VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreatePipelineLayout); VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, DestroyPipelineLayout); + + /* Pipeline Cache */ VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreatePipelineCache); - VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, DestroyPipeline); + VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, DestroyPipelineCache); /* Command buffers */ diff --git a/gfx/common/vulkan_common.h b/gfx/common/vulkan_common.h index e3334e9d16..d456932d48 100644 --- a/gfx/common/vulkan_common.h +++ b/gfx/common/vulkan_common.h @@ -182,6 +182,7 @@ typedef struct vulkan_context /* Pipeline Cache */ PFN_vkCreatePipelineCache vkCreatePipelineCache; + PFN_vkDestroyPipelineCache vkDestroyPipelineCache; /* Pipeline Barriers */ PFN_vkCmdPipelineBarrier vkCmdPipelineBarrier; diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index cab3db710f..e7d6df9dcb 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -718,7 +718,7 @@ static void vulkan_deinit_static_resources( vk_t *vk) { unsigned i; - vkDestroyPipelineCache(vk->context->device, + VKFUNC(vkDestroyPipelineCache)(vk->context->device, vk->pipelines.cache, NULL); vulkan_destroy_texture(&vk->context->fp, vk->context->device,