(Vulkan) Function pointer for vkFreeCommandBuffers

This commit is contained in:
twinaphex 2016-02-29 21:58:10 +01:00
parent 1e407079e4
commit caed6c61cb
3 changed files with 4 additions and 2 deletions

View File

@ -487,7 +487,7 @@ struct vk_texture vulkan_create_texture(vk_t *vk,
VKFUNC(vkQueueWaitIdle)(vk->context->queue); VKFUNC(vkQueueWaitIdle)(vk->context->queue);
slock_unlock(vk->context->queue_lock); 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, vulkan_destroy_texture(&vk->context->fp,
vk->context->device, &tmp); vk->context->device, &tmp);
tex.layout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL; 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, CreateFramebuffer);
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, DestroyFramebuffer); 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, AllocateCommandBuffers);
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, FreeCommandBuffers);
/* Memory allocation */ /* Memory allocation */
VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, MapMemory); VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, MapMemory);

View File

@ -179,6 +179,7 @@ typedef struct vulkan_context
PFN_vkBeginCommandBuffer vkBeginCommandBuffer; PFN_vkBeginCommandBuffer vkBeginCommandBuffer;
PFN_vkEndCommandBuffer vkEndCommandBuffer; PFN_vkEndCommandBuffer vkEndCommandBuffer;
PFN_vkResetCommandBuffer vkResetCommandBuffer; PFN_vkResetCommandBuffer vkResetCommandBuffer;
PFN_vkFreeCommandBuffers vkFreeCommandBuffers;
PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers; PFN_vkAllocateCommandBuffers vkAllocateCommandBuffers;
/* Command Buffer Submission */ /* Command Buffer Submission */

View File

@ -537,7 +537,7 @@ static void vulkan_deinit_command_buffers(
for (i = 0; i < vk->num_swapchain_images; i++) for (i = 0; i < vk->num_swapchain_images; i++)
{ {
if (vk->swapchain[i].cmd) if (vk->swapchain[i].cmd)
vkFreeCommandBuffers(vk->context->device, VKFUNC(vkFreeCommandBuffers)(vk->context->device,
vk->swapchain[i].cmd_pool, 1, &vk->swapchain[i].cmd); vk->swapchain[i].cmd_pool, 1, &vk->swapchain[i].cmd);
VKFUNC(vkDestroyCommandPool)(vk->context->device, VKFUNC(vkDestroyCommandPool)(vk->context->device,