mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 01:00:10 +01:00
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:
parent
e66a901bc8
commit
99a5b11af5
3 changed files with 11 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue