mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 06:48:06 +02:00
panfrost: Use RUN_COMPUTE over RUN_COMPUTE_INDIRECT
RUN_COMPUTE_INDIRECT has been found to cause intermittent hangs, so
this change replaces it with RUN_COMPUTE and a set TASK_AXIS_X.
While this task axis might be suboptimal, the performance cost is
somewhat offset by RUN_COMPUTE not being an emulated command.
Fixes: 447075eeee ("panfrost: Add support for the CSF job frontend")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33841>
This commit is contained in:
parent
7271b8ee49
commit
6bf9ad2610
1 changed files with 10 additions and 2 deletions
|
|
@ -952,8 +952,16 @@ GENX(csf_launch_grid)(struct panfrost_batch *batch,
|
|||
/* Wait for the stores */
|
||||
cs_wait_slot(b, 0, false);
|
||||
|
||||
cs_run_compute_indirect(b, DIV_ROUND_UP(max_thread_cnt, threads_per_wg),
|
||||
false, cs_shader_res_sel(0, 0, 0, 0));
|
||||
/* Use run_compute with a set task axis instead of run_compute_indirect as
|
||||
* run_compute_indirect has been found to cause intermittent hangs. This
|
||||
* is safe, as the task increment will be clamped by the job size along
|
||||
* the specified axis.
|
||||
* The chosen task axis is potentially suboptimal, as choosing good
|
||||
* increment/axis parameters requires knowledge of job dimensions, but
|
||||
* this is somewhat offset by run_compute being a native instruction. */
|
||||
unsigned task_axis = MALI_TASK_AXIS_X;
|
||||
cs_run_compute(b, DIV_ROUND_UP(max_thread_cnt, threads_per_wg), task_axis,
|
||||
false, cs_shader_res_sel(0, 0, 0, 0));
|
||||
} else {
|
||||
/* Set size in workgroups per dimension immediately */
|
||||
cs_move32_to(b, cs_sr_reg32(b, COMPUTE, JOB_SIZE_X), info->grid[0]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue