freedreno: rework blit API
[mesa.git] / src / gallium / drivers / freedreno / a5xx / fd5_blitter.c
index 6e8177d3444870eaee42187b8f510842e36b2f82..0cfe92ac22f5e9e979f769a11eb8e78c10377603 100644 (file)
@@ -449,17 +449,16 @@ emit_blit(struct fd_ringbuffer *ring, const struct pipe_blit_info *info)
        }
 }
 
-void
+bool
 fd5_blitter_blit(struct fd_context *ctx, const struct pipe_blit_info *info)
 {
        struct fd_batch *batch;
 
        if (!can_do_blit(info)) {
-               fd_blitter_blit(ctx, info);
-               return;
+               return false;
        }
 
-       batch = fd_batch_create(ctx, true);
+       batch = fd_bc_alloc_batch(&ctx->screen->batch_cache, ctx, true);
 
        fd5_emit_restore(batch, batch->draw);
        fd5_emit_lrz_flush(batch->draw);
@@ -482,6 +481,8 @@ fd5_blitter_blit(struct fd_context *ctx, const struct pipe_blit_info *info)
        batch->needs_flush = true;
 
        fd_batch_flush(batch, false, false);
+
+       return true;
 }
 
 unsigned