panfrost: Extend the panfrost_batch_add_bo() API to pass access flags
authorBoris Brezillon <boris.brezillon@collabora.com>
Sun, 15 Sep 2019 07:21:13 +0000 (09:21 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Thu, 3 Oct 2019 20:55:38 +0000 (16:55 -0400)
commitada752afe404a3afc96e401fc979d8040f30204b
treef024ff119a3d2fd88b5c94b6be12470fd630d12e
parent12f790f7dac469909a30fa6d882a2790207df9a2
panfrost: Extend the panfrost_batch_add_bo() API to pass access flags

The type of access being done on a BO has impacts on job scheduling
(shared resources being written enforce serialization while those
being read only allow for job parallelization) and BO lifetime (the
fragment job might last longer than the vertex/tiler ones, if we can,
it's good to release BOs earlier so that others can re-use them
through the BO re-use cache).

Let's pass extra access flags to panfrost_batch_add_bo() and
panfrost_batch_create_bo() so the batch submission logic can take the
appropriate when submitting batches. Note that this information is not
used yet, we're just patching callers to pass the correct flags here.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
src/gallium/drivers/panfrost/pan_allocate.c
src/gallium/drivers/panfrost/pan_blend_cso.c
src/gallium/drivers/panfrost/pan_bo.h
src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pan_instancing.c
src/gallium/drivers/panfrost/pan_job.c
src/gallium/drivers/panfrost/pan_job.h
src/gallium/drivers/panfrost/pan_varyings.c