mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-08 13:28:06 +02:00
panfrost: mark indirect compute buffer as read
When we dispatch an indirect compute job, the buffer containing the indirect parameters should be marked as read (since the GPU will read the parameters from there). Without this there's a race condition if the CPU later updates the buffer. Signed-off-by: Eric R. Smith <eric.smith@collabora.com> Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com> Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28512>
This commit is contained in:
parent
fb1c3f7f5d
commit
ad7457fe20
1 changed files with 5 additions and 0 deletions
|
|
@ -3065,6 +3065,11 @@ panfrost_launch_grid_on_batch(struct pipe_context *pipe,
|
|||
mali_ptr saved_tls = batch->tls.gpu;
|
||||
batch->tls.gpu = panfrost_emit_shared_memory(batch, info);
|
||||
|
||||
/* if indirect, mark the indirect buffer as being read */
|
||||
if (info->indirect)
|
||||
panfrost_batch_read_rsrc(batch, pan_resource(info->indirect), PIPE_SHADER_COMPUTE);
|
||||
|
||||
/* launch it */
|
||||
JOBX(launch_grid)(batch, info);
|
||||
batch->compute_count++;
|
||||
batch->tls.gpu = saved_tls;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue