From b702ff537842f72a0f6a3a4a2c6608c52fce1004 Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 11 Dec 2018 11:16:47 +0000 Subject: [PATCH] virgl: simplify virgl_hw_set_index_buffer MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Erik Faye-Lund Reviewed-by: Mathias Fröhlich Tested-By: Gert Wollny --- src/gallium/drivers/virgl/virgl_context.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c index b03e9508c61..df6d9b83ffb 100644 --- a/src/gallium/drivers/virgl/virgl_context.c +++ b/src/gallium/drivers/virgl/virgl_context.c @@ -447,10 +447,9 @@ static void virgl_set_blend_color(struct pipe_context *ctx, virgl_encoder_set_blend_color(vctx, color); } -static void virgl_hw_set_index_buffer(struct pipe_context *ctx, +static void virgl_hw_set_index_buffer(struct virgl_context *vctx, struct virgl_indexbuf *ib) { - struct virgl_context *vctx = virgl_context(ctx); virgl_encoder_set_index_buffer(vctx, ib); virgl_attach_res_index_buffer(vctx, ib); } @@ -700,7 +699,7 @@ static void virgl_draw_vbo(struct pipe_context *ctx, vctx->num_draws++; virgl_hw_set_vertex_buffers(vctx); if (info.index_size) - virgl_hw_set_index_buffer(ctx, &ib); + virgl_hw_set_index_buffer(vctx, &ib); virgl_encoder_draw_vbo(vctx, &info); -- 2.30.2