mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 09:08:10 +02:00
venus: acquire mutex when recycling query feedback cmds
Fixes: 5b24ab91e4 ("venus: switch to unconditionally deferred query feedback")
Signed-off-by: Juston Li <justonli@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27163>
This commit is contained in:
parent
c3417c5bb8
commit
aceda1f5f6
2 changed files with 4 additions and 0 deletions
|
|
@ -696,11 +696,13 @@ vn_CreateCommandPool(VkDevice device,
|
|||
static inline void
|
||||
vn_recycle_query_feedback_cmd(struct vn_command_buffer *cmd)
|
||||
{
|
||||
simple_mtx_lock(&cmd->linked_query_feedback_cmd->pool->mutex);
|
||||
vn_ResetCommandBuffer(
|
||||
vn_command_buffer_to_handle(cmd->linked_query_feedback_cmd->cmd), 0);
|
||||
list_add(&cmd->linked_query_feedback_cmd->head,
|
||||
&cmd->linked_query_feedback_cmd->pool->free_query_feedback_cmds);
|
||||
cmd->linked_query_feedback_cmd = NULL;
|
||||
simple_mtx_unlock(&cmd->linked_query_feedback_cmd->pool->mutex);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -999,12 +999,14 @@ vn_queue_submission_cleanup(struct vn_queue_submission *submit)
|
|||
const VkAllocationCallbacks *alloc = &queue->base.base.base.device->alloc;
|
||||
|
||||
if (submit->recycle_query_feedback_cmd) {
|
||||
simple_mtx_lock(&submit->recycle_query_feedback_cmd->pool->mutex);
|
||||
vn_ResetCommandBuffer(
|
||||
vn_command_buffer_to_handle(submit->recycle_query_feedback_cmd->cmd),
|
||||
0);
|
||||
list_add(
|
||||
&submit->recycle_query_feedback_cmd->head,
|
||||
&submit->recycle_query_feedback_cmd->pool->free_query_feedback_cmds);
|
||||
simple_mtx_unlock(&submit->recycle_query_feedback_cmd->pool->mutex);
|
||||
}
|
||||
|
||||
/* TODO clean up pending src feedbacks on failure? */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue