panfrost: Hoist add_fbo_bo call
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Fri, 14 Aug 2020 22:31:05 +0000 (18:31 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 19 Aug 2020 08:24:37 +0000 (08:24 +0000)
commita2e41590293a4c773c4f399e4f46fcf91cf8cbe9
treee4a4ff0a6f2d0e2d2e3a4c29e885f844e0bab8cc
parent433fa39c2e616e2f0a6102904c93969a4e42e79c
panfrost: Hoist add_fbo_bo call

Move it to batch initialization, to take it out of the clear/draw path.
This should make sense - as soon as the batch is created, we need to
hold the refference. Functionally there shouldn't be unused batches
floating around anyway.

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6327>
src/gallium/drivers/panfrost/pan_context.c
src/gallium/drivers/panfrost/pan_job.c
src/gallium/drivers/panfrost/pan_job.h