From 6f4b375c94868099cf413f50183270a68b8c6c3b Mon Sep 17 00:00:00 2001 From: Juston Li Date: Tue, 31 Jan 2023 15:57:24 -0800 Subject: [PATCH] anv: check initial cmd_buffer is chainable Submitting a batch with the first command buffer with the simultaneous bit set followed by a command buffer without the bit set gets past the check and triggers this assert attempting to chain them: ../src/intel/vulkan/anv_batch_chain.c:1147: anv_cmd_buffer_chain_command_buffers: Assertion `num_cmd_buffers == 1' failed. Signed-off-by: Juston Li Part-of: --- src/intel/vulkan/anv_batch_chain.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/intel/vulkan/anv_batch_chain.c b/src/intel/vulkan/anv_batch_chain.c index d66572d..fd57f74 100644 --- a/src/intel/vulkan/anv_batch_chain.c +++ b/src/intel/vulkan/anv_batch_chain.c @@ -1266,6 +1266,7 @@ anv_queue_submit_locked(struct anv_queue *queue, uint32_t next = n + 1; /* Can we chain the last buffer into the next one? */ if (next < end && + anv_cmd_buffer_is_chainable(cmd_buffers[n]) && anv_cmd_buffer_is_chainable(cmd_buffers[next]) && can_chain_query_pools (cmd_buffers[next]->perf_query_pool, perf_query_pool)) { -- 2.7.4