diff --git a/gfx/common/vulkan_common.c b/gfx/common/vulkan_common.c index 0b585f577f..15d19c79e8 100644 --- a/gfx/common/vulkan_common.c +++ b/gfx/common/vulkan_common.c @@ -472,7 +472,7 @@ struct vk_texture vulkan_create_texture(vk_t *vk, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_TOP_OF_PIPE_BIT); - vkEndCommandBuffer(staging); + VKFUNC(vkEndCommandBuffer)(staging); submit_info.commandBufferCount = 1; submit_info.pCommandBuffers = &staging; @@ -1168,6 +1168,7 @@ bool vulkan_context_init(gfx_ctx_vulkan_data_t *vk, /* Command buffers */ VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, CreateCommandPool); VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, DestroyCommandPool); + VK_GET_INSTANCE_PROC_ADDR(vk, vk->context.instance, EndCommandBuffer); if (VKFUNC(vkEnumeratePhysicalDevices)(vk->context.instance, &gpu_count, NULL) != VK_SUCCESS) diff --git a/gfx/common/vulkan_common.h b/gfx/common/vulkan_common.h index c9a8e1e5c0..a920888752 100644 --- a/gfx/common/vulkan_common.h +++ b/gfx/common/vulkan_common.h @@ -173,6 +173,7 @@ typedef struct vulkan_context /* Command buffers */ PFN_vkCreateCommandPool vkCreateCommandPool; PFN_vkDestroyCommandPool vkDestroyCommandPool; + PFN_vkEndCommandBuffer vkEndCommandBuffer; /* Framebuffers */ PFN_vkCreateFramebuffer vkCreateFramebuffer; diff --git a/gfx/drivers/vulkan.c b/gfx/drivers/vulkan.c index d38ef11cd5..e3fb4d5bea 100644 --- a/gfx/drivers/vulkan.c +++ b/gfx/drivers/vulkan.c @@ -1645,7 +1645,7 @@ static bool vulkan_frame(void *data, const void *frame, VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT); } - vkEndCommandBuffer(vk->cmd); + VKFUNC(vkEndCommandBuffer)(vk->cmd); /* Submit command buffers to GPU. */