panfrost: Allow passing an explicit global dependency when queuing a job
authorBoris Brezillon <boris.brezillon@collabora.com>
Sat, 27 Feb 2021 10:50:51 +0000 (11:50 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 11 Mar 2021 14:30:19 +0000 (14:30 +0000)
commit1758da0a7e412fa6d6054ee2dcc5a17f69b5ef9c
tree4a1942bf18a1250c3c9fb44fb5b0aa7859fc8c61
parent0bb091fd7c278802b343e8bd0f3ad08d88c2af0b
panfrost: Allow passing an explicit global dependency when queuing a job

We will have 2 compute jobs per indexed indirect draw, one doing the
min-max index search and one patching the cmdstream. The second compute
job needs to depend on the first one, as well as the previous indirect
draw job to avoid corrupting the indirect draw context which is shared
at the batch level (global dependency).

Instead of handling that case in panfrost_add_job(), extend
panfrost_add_job() to accept an explicit global dependency.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9520>
src/gallium/drivers/panfrost/pan_cmdstream.c
src/gallium/drivers/panfrost/pan_compute.c
src/panfrost/lib/pan_blit.c
src/panfrost/lib/pan_scoreboard.c
src/panfrost/lib/pan_scoreboard.h