diff --git a/src/gallium/drivers/asahi/agx_pipe.c b/src/gallium/drivers/asahi/agx_pipe.c index 7edcfd12ec9..4a35eb57025 100644 --- a/src/gallium/drivers/asahi/agx_pipe.c +++ b/src/gallium/drivers/asahi/agx_pipe.c @@ -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; diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index 0335be677e4..c1bf2cf5de8 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -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; diff --git a/src/gallium/drivers/asahi/agx_state.h b/src/gallium/drivers/asahi/agx_state.h index f027f751f79..b94ff47791e 100644 --- a/src/gallium/drivers/asahi/agx_state.h +++ b/src/gallium/drivers/asahi/agx_state.h @@ -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