asahi: Don't hazard track fake resources

Convenient for meta, which we use for implementing GS.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26056>
This commit is contained in:
Alyssa Rosenzweig 2023-10-28 09:19:14 -04:00 committed by Marge Bot
parent 949741d4c3
commit 82e3eb4b74

View file

@ -437,14 +437,18 @@ agx_sync_writer(struct agx_context *ctx, struct agx_resource *rsrc,
void
agx_batch_reads(struct agx_batch *batch, struct agx_resource *rsrc)
{
/* Hazard: read-after-write */
agx_flush_writer_except(batch->ctx, rsrc, batch, "Read from another batch",
false);
agx_batch_add_bo(batch, rsrc->bo);
if (rsrc->separate_stencil)
agx_batch_add_bo(batch, rsrc->separate_stencil->bo);
/* Don't hazard track fake resources internally created for meta */
if (!rsrc->base.screen)
return;
/* Hazard: read-after-write */
agx_flush_writer_except(batch->ctx, rsrc, batch, "Read from another batch",
false);
}
void