asahi: Label batch flush reasons

This was helpful in identifying the bottleneck in Inochi2D (the clears).

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18380>
This commit is contained in:
Alyssa Rosenzweig 2022-06-16 23:30:29 -04:00 committed by Marge Bot
parent e66a901bc8
commit 99a5b11af5
3 changed files with 11 additions and 3 deletions

View file

@ -265,9 +265,9 @@ agx_transfer_map(struct pipe_context *pctx,
return NULL;
if (ctx->batch->cbufs[0] && resource == ctx->batch->cbufs[0]->texture)
pctx->flush(pctx, NULL, 0);
agx_flush_all(ctx, "Transfer to colour buffer");
if (ctx->batch->zsbuf && resource == ctx->batch->zsbuf->texture)
pctx->flush(pctx, NULL, 0);
agx_flush_all(ctx, "Transfer to depth buffer");
struct agx_transfer *transfer = CALLOC_STRUCT(agx_transfer);
transfer->base.level = level;

View file

@ -726,7 +726,7 @@ agx_set_framebuffer_state(struct pipe_context *pctx,
return;
/* XXX: eliminate this flush with batch tracking logic */
pctx->flush(pctx, NULL, 0);
agx_flush_all(ctx, "Framebuffer switch");
util_copy_framebuffer_state(&ctx->framebuffer, state);
ctx->batch->width = state->width;

View file

@ -333,4 +333,12 @@ void agx_blit(struct pipe_context *pipe,
void agx_internal_shaders(struct agx_device *dev);
/* Batch logic */
static void
agx_flush_all(struct agx_context *ctx, const char *reason)
{
//printf("Flushing due to: %s\n", reason);
ctx->base.flush(&ctx->base, NULL, 0);
}
#endif