From 1569709663f5ad3c339494f756bcc05f37044182 Mon Sep 17 00:00:00 2001 From: Kenneth Graunke Date: Wed, 29 May 2013 08:21:14 -0700 Subject: vbo: Use the new primitive restart index helper function. This gets the correct restart index for unsigned byte/short types when using GL_PRIMITIVE_RESTART_FIXED_INDEX. NOTE: This is a candidate for the 9.1 branch. Signed-off-by: Kenneth Graunke Reviewed-by: Eric Anholt Reviewed-by: Ian Romanick --- src/mesa/vbo/vbo_exec_array.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/mesa/vbo/vbo_exec_array.c') diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index cadb203c3cf..9dadd0421c3 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -92,7 +92,7 @@ vbo_get_minmax_index(struct gl_context *ctx, const GLuint count) { const GLboolean restart = ctx->Array._PrimitiveRestart; - const GLuint restartIndex = ctx->Array._RestartIndex; + const GLuint restartIndex = _mesa_primitive_restart_index(ctx, ib->type); const int index_size = vbo_sizeof_ib_type(ib->type); const char *indices; GLuint i; -- cgit v1.2.3