panfrost: Add FBO BOs to batch->bos earlier
authorBoris Brezillon <boris.brezillon@collabora.com>
Sat, 14 Sep 2019 16:40:23 +0000 (18:40 +0200)
committerBoris Brezillon <boris.brezillon@collabora.com>
Wed, 18 Sep 2019 08:37:56 +0000 (10:37 +0200)
commit0eec73a800fb87b691df21ba9482db1317c744d3
treecf80afef680e6a8c8a1084058f223e52ccf9a892
parent5a4d095f9b58e127c2eae9aa64595afeb36b554d
panfrost: Add FBO BOs to batch->bos earlier

If we want the batch dependency tracking to work correctly we must
make sure all BOs are added to the batch->bos set early enough. Adding
FBO BOs when generating the fragment job is clearly to late. Add a
panfrost_batch_add_fbo_bos helper and call it in the clear/draw path.

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