mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-02 09:01:38 -05:00
render/vulkan: improve error handling in vulkan_begin_render_pass()
Release the command buffer if we end up not submitting it.
This commit is contained in:
parent
0ba3ea3bcd
commit
beb820b573
1 changed files with 1 additions and 0 deletions
|
|
@ -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);
|
VkResult res = vkBeginCommandBuffer(cb->vk, &begin_info);
|
||||||
if (res != VK_SUCCESS) {
|
if (res != VK_SUCCESS) {
|
||||||
wlr_vk_error("vkBeginCommandBuffer", res);
|
wlr_vk_error("vkBeginCommandBuffer", res);
|
||||||
|
vulkan_reset_command_buffer(cb);
|
||||||
free(pass);
|
free(pass);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue