From 00143a62418687d388a0563b3044e2fd82d18e2e Mon Sep 17 00:00:00 2001 From: Erik Faye-Lund Date: Tue, 11 Dec 2018 11:16:35 +0000 Subject: [PATCH] virgl: simplify virgl_hw_set_vertex_buffers 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 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/virgl/virgl_context.c b/src/gallium/drivers/virgl/virgl_context.c index f0ee64c1457..b03e9508c61 100644 --- a/src/gallium/drivers/virgl/virgl_context.c +++ b/src/gallium/drivers/virgl/virgl_context.c @@ -425,10 +425,8 @@ static void virgl_set_vertex_buffers(struct pipe_context *ctx, vctx->vertex_array_dirty = TRUE; } -static void virgl_hw_set_vertex_buffers(struct pipe_context *ctx) +static void virgl_hw_set_vertex_buffers(struct virgl_context *vctx) { - struct virgl_context *vctx = virgl_context(ctx); - if (vctx->vertex_array_dirty) { virgl_encoder_set_vertex_buffers(vctx, vctx->num_vertex_buffers, vctx->vertex_buffer); virgl_attach_res_vertex_buffers(vctx); @@ -700,7 +698,7 @@ static void virgl_draw_vbo(struct pipe_context *ctx, u_upload_unmap(vctx->uploader); vctx->num_draws++; - virgl_hw_set_vertex_buffers(ctx); + virgl_hw_set_vertex_buffers(vctx); if (info.index_size) virgl_hw_set_index_buffer(ctx, &ib); -- 2.30.2