From 57659323751e40be49a4a102a312ca65a3c4d152 Mon Sep 17 00:00:00 2001 From: Rob Clark Date: Sun, 14 Mar 2021 11:13:58 -0700 Subject: [PATCH] freedreno: Use multi-draw helper In the normal case, we'll be pushing multi-draw (eventually) down into the backend, but there are still a few remaining edge cases where we can't deal with it. Signed-off-by: Rob Clark Part-of: --- src/gallium/drivers/freedreno/freedreno_draw.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/gallium/drivers/freedreno/freedreno_draw.c b/src/gallium/drivers/freedreno/freedreno_draw.c index ee36da81087..9893a11d410 100644 --- a/src/gallium/drivers/freedreno/freedreno_draw.c +++ b/src/gallium/drivers/freedreno/freedreno_draw.c @@ -257,19 +257,13 @@ update_draw_stats(struct fd_context *ctx, const struct pipe_draw_info *info, static void fd_draw_vbo(struct pipe_context *pctx, const struct pipe_draw_info *info, - const struct pipe_draw_indirect_info *indirect, - const struct pipe_draw_start_count *draws, - unsigned num_draws) + const struct pipe_draw_indirect_info *indirect, + const struct pipe_draw_start_count *draws, + unsigned num_draws) in_dt { if (num_draws > 1) { - struct pipe_draw_info tmp_info = *info; - - for (unsigned i = 0; i < num_draws; i++) { - fd_draw_vbo(pctx, &tmp_info, indirect, &draws[i], 1); - if (tmp_info.increment_draw_id) - tmp_info.drawid++; - } + util_draw_multi(pctx, info, indirect, draws, num_draws); return; }