From caed6c61cbffbf35237e3764e3f45de271f7b1c7 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 29 Feb 2016 21:58:10 +0100 Subject: [PATCH] (Vulkan) Function pointer for vkFreeCommandBuffers --- gfx/common/vulkan_common.c | 3 ++- gfx/common/vulkan_common.h | 1 + gfx/drivers/vulkan.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gfx/common/vulkan_common.c b/gfx/common/vulkan_common.c index df8a0665e2..a4cce9c8af 100644 --- a/gfx/common/vulkan_common.c +++ b/gfx/common/vulkan_common.c @@ -487,7 +487,7 @@ struct vk_texture vulkan_create_texture(vk_t *vk, VKFUNC(vkQueueWaitIdle)(vk->context->queue); slock_unlock(vk->context->queue_lock); - vkFreeCommandBuffers(vk->context->device, vk->staging_pool, 1, &staging); + VKFUNC(vkFreeCommandBuffers)(vk->context->device, vk->staging_pool, 1, &staging); vulkan_destroy_texture(&vk->context->fp, vk->context->device, &tmp); tex.layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; @@ -1152,6 +1152,7 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk, VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreateFramebuffer); VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, DestroyFramebuffer); VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, AllocateCommandBuffers); + VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, FreeCommandBuffers); /* Memory allocation */ VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, MapMemory); diff --git a/gfx/common/vulkan_common.h b/gfx/common/vulkan_common.h index b8f78780b0..6156f62f4f 100644 --- a/gfx/common/vulkan_common.h +++ b/gfx/common/vulkan_common.h @@ -179,6 +179,7 @@ typedef struct vulkan_context PFN_vkBeginCommandBuffer vkBeginCommandBuffer; PFN_vkEndCommandBuffer vkEndCommandBuffer; PFN_vkResetCommandBuffer vkResetCommandBuffer; + PFN_vkFreeCommandBuffers vkFreeCommandBuffers; PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers; /* Command Buffer Submission */ diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index 5971ff3f06..c9d22379f7 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -537,7 +537,7 @@ static void vulkan_deinit_command_buffers( for (i = 0; i < vk->num_swapchain_images; i++) { if (vk->swapchain[i].cmd) - vkFreeCommandBuffers(vk->context->device, + VKFUNC(vkFreeCommandBuffers)(vk->context->device, vk->swapchain[i].cmd_pool, 1, &vk->swapchain[i].cmd); VKFUNC(vkDestroyCommandPool)(vk->context->device,