iris: Use util_draw_multi() helper

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742>
This commit is contained in:
Rob Clark 2021-03-21 09:57:17 -07:00 committed by Marge Bot
parent bd46ef14eb
commit 615cff4fa0

View File

@ -32,6 +32,7 @@
#include "pipe/p_state.h"
#include "pipe/p_context.h"
#include "pipe/p_screen.h"
#include "util/u_draw.h"
#include "util/u_inlines.h"
#include "util/u_transfer.h"
#include "util/u_upload_mgr.h"
@ -244,13 +245,7 @@ iris_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info,
unsigned num_draws)
{
if (num_draws > 1) {
struct pipe_draw_info tmp_info = *info;
for (unsigned i = 0; i < num_draws; i++) {
iris_draw_vbo(ctx, &tmp_info, indirect, &draws[i], 1);
if (tmp_info.increment_draw_id)
tmp_info.drawid++;
}
util_draw_multi(ctx, info, indirect, draws, num_draws);
return;
}