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>
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;
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;
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