mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
render/vulkan: improve error handling in render_pass_submit()
Closes: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3644
This commit is contained in:
parent
30aca4df0d
commit
0ba3ea3bcd
3 changed files with 34 additions and 10 deletions
|
|
@ -567,6 +567,19 @@ uint64_t vulkan_end_command_buffer(struct wlr_vk_command_buffer *cb,
|
|||
return cb->timeline_point;
|
||||
}
|
||||
|
||||
void vulkan_reset_command_buffer(struct wlr_vk_command_buffer *cb) {
|
||||
if (cb == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
cb->recording = false;
|
||||
|
||||
VkResult res = vkResetCommandBuffer(cb->vk, 0);
|
||||
if (res != VK_SUCCESS) {
|
||||
wlr_vk_error("vkResetCommandBuffer", res);
|
||||
}
|
||||
}
|
||||
|
||||
static void destroy_render_buffer(struct wlr_vk_render_buffer *buffer) {
|
||||
wl_list_remove(&buffer->link);
|
||||
wlr_addon_finish(&buffer->addon);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue