From beb820b573fca805b345c6164e0f1a25256c46c4 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Tue, 30 May 2023 14:13:16 +0200 Subject: render/vulkan: improve error handling in vulkan_begin_render_pass() Release the command buffer if we end up not submitting it. --- render/vulkan/pass.c | 1 + 1 file changed, 1 insertion(+) (limited to 'render') diff --git a/render/vulkan/pass.c b/render/vulkan/pass.c index 4ff0d5c1..ac0ba263 100644 --- a/render/vulkan/pass.c +++ b/render/vulkan/pass.c @@ -579,6 +579,7 @@ struct wlr_vk_render_pass *vulkan_begin_render_pass(struct wlr_vk_renderer *rend VkResult res = vkBeginCommandBuffer(cb->vk, &begin_info); if (res != VK_SUCCESS) { wlr_vk_error("vkBeginCommandBuffer", res); + vulkan_reset_command_buffer(cb); free(pass); return NULL; } -- cgit v1.2.3