summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c2
-rw-r--r--src/mesa/vbo/vbo_primitive_restart.c3
2 files changed, 3 insertions, 2 deletions
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;
diff --git a/src/mesa/vbo/vbo_primitive_restart.c b/src/mesa/vbo/vbo_primitive_restart.c
index a6a0149ca63..418f8829d9b 100644
--- a/src/mesa/vbo/vbo_primitive_restart.c
+++ b/src/mesa/vbo/vbo_primitive_restart.c
@@ -31,6 +31,7 @@
#include "main/imports.h"
#include "main/bufferobj.h"
#include "main/macros.h"
+#include "main/varray.h"
#include "vbo.h"
#include "vbo_context.h"
@@ -171,7 +172,7 @@ vbo_sw_primitive_restart(struct gl_context *ctx,
GLuint sub_prim_num;
GLuint end_index;
GLuint sub_end_index;
- GLuint restart_index = ctx->Array._RestartIndex;
+ GLuint restart_index = _mesa_primitive_restart_index(ctx, ib->type);
struct _mesa_prim temp_prim;
struct vbo_context *vbo = vbo_context(ctx);
vbo_draw_func draw_prims_func = vbo->draw_prims;