vulkan/cmd_buffer: add record_state to the common command buffer.
This pulls the record state out of the cmd queue into the command buffer. It can be used here by other drivers. v2: add some get/set api: not set only sets the first error. v3 (Jason Ekstrand): - Rename set_record_result to set_error - Automatically log the set error - Add a new vk_command_bufer_has_error() helper - Split out vk_cmd_queue changes into their own commit Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16918>
This commit is contained in:
committed by
Marge Bot
parent
7d9df64b07
commit
541be28099
@@ -39,6 +39,7 @@ vk_command_buffer_init(struct vk_command_buffer *command_buffer,
|
||||
command_buffer->pool = pool;
|
||||
command_buffer->level = level;
|
||||
vk_dynamic_graphics_state_init(&command_buffer->dynamic_graphics_state);
|
||||
command_buffer->record_result = VK_SUCCESS;
|
||||
vk_cmd_queue_init(&command_buffer->cmd_queue, &pool->alloc);
|
||||
util_dynarray_init(&command_buffer->labels, NULL);
|
||||
command_buffer->region_begin = true;
|
||||
@@ -52,6 +53,7 @@ void
|
||||
vk_command_buffer_reset(struct vk_command_buffer *command_buffer)
|
||||
{
|
||||
vk_dynamic_graphics_state_clear(&command_buffer->dynamic_graphics_state);
|
||||
command_buffer->record_result = VK_SUCCESS;
|
||||
vk_command_buffer_reset_render_pass(command_buffer);
|
||||
vk_cmd_queue_reset(&command_buffer->cmd_queue);
|
||||
util_dynarray_clear(&command_buffer->labels);
|
||||
|
||||
Reference in New Issue
Block a user