virgl: Use util_draw_multi() helper

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9742>
This commit is contained in:
Rob Clark 2021-03-21 10:14:10 -07:00 committed by Marge Bot
parent 6a2634e9be
commit 0254e513f2

View File

@ -28,6 +28,7 @@
#include "pipe/p_defines.h"
#include "pipe/p_screen.h"
#include "pipe/p_state.h"
#include "util/u_draw.h"
#include "util/u_inlines.h"
#include "util/u_memory.h"
#include "util/format/u_format.h"
@ -864,13 +865,7 @@ static void virgl_draw_vbo(struct pipe_context *ctx,
unsigned num_draws)
{
if (num_draws > 1) {
struct pipe_draw_info tmp_info = *dinfo;
for (unsigned i = 0; i < num_draws; i++) {
virgl_draw_vbo(ctx, &tmp_info, indirect, &draws[i], 1);
if (tmp_info.increment_draw_id)
tmp_info.drawid++;
}
util_draw_multi(ctx, dinfo, indirect, draws, num_draws);
return;
}