From 53cd67859dd82c697c1a22654f6389181ec639ee Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Wed, 26 Apr 2017 00:28:05 +0200 Subject: [PATCH] vbo: set min_index = 0 so gallium can use the value directly MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit We could also remove index_bounds_valid and use max_index != ~0 instead. Opinions on that are welcome. Reviewed-by: Nicolai Hähnle --- src/mesa/vbo/vbo_context.c | 2 +- src/mesa/vbo/vbo_exec_array.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/mesa/vbo/vbo_context.c b/src/mesa/vbo/vbo_context.c index 7022fe96cab..384e40516c8 100644 --- a/src/mesa/vbo/vbo_context.c +++ b/src/mesa/vbo/vbo_context.c @@ -168,7 +168,7 @@ vbo_draw_indirect_prims(struct gl_context *ctx, } vbo->draw_prims(ctx, prim, draw_count, - ib, false, ~0, ~0, + ib, false, 0, ~0, NULL, 0, ctx->DrawIndirectBuffer); diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index aecfad02b7b..15382eaaae0 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -1322,7 +1322,7 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode, } vbo->draw_prims(ctx, prim, primcount, &ib, - false, ~0, ~0, NULL, 0, NULL); + false, 0, ~0, NULL, 0, NULL); } else { /* render one prim at a time */ @@ -1351,7 +1351,7 @@ vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode, else prim[0].basevertex = 0; - vbo->draw_prims(ctx, prim, 1, &ib, false, ~0, ~0, NULL, 0, NULL); + vbo->draw_prims(ctx, prim, 1, &ib, false, 0, ~0, NULL, 0, NULL); } } @@ -1443,7 +1443,7 @@ vbo_draw_transform_feedback(struct gl_context *ctx, GLenum mode, * (like in DrawArrays), but we have no way to know how many vertices * will be rendered. */ - vbo->draw_prims(ctx, prim, 1, NULL, GL_FALSE, ~0, ~0, obj, stream, NULL); + vbo->draw_prims(ctx, prim, 1, NULL, GL_FALSE, 0, ~0, obj, stream, NULL); if (MESA_DEBUG_FLAGS & DEBUG_ALWAYS_FLUSH) { _mesa_flush(ctx); -- 2.30.2