llvmpipe: shorten hold time on the screen mutex

There is no requirement to hold this mutex over the wait. I doubt
it matters much in practice.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12432>
This commit is contained in:
Dave Airlie 2021-08-18 05:57:31 +10:00
parent 4ccee031e9
commit 8d3e97344c
1 changed files with 1 additions and 1 deletions

View File

@ -1361,9 +1361,9 @@ static void llvmpipe_launch_grid(struct pipe_context *pipe,
struct lp_cs_tpool_task *task;
mtx_lock(&screen->cs_mutex);
task = lp_cs_tpool_queue_task(screen->cs_tpool, cs_exec_fn, &job_info, num_tasks);
mtx_unlock(&screen->cs_mutex);
lp_cs_tpool_wait_for_task(screen->cs_tpool, &task);
mtx_unlock(&screen->cs_mutex);
}
llvmpipe->pipeline_statistics.cs_invocations += num_tasks * info->block[0] * info->block[1] * info->block[2];
}