From eaae92a349af1fd6641c4bdd4bfd1185b1b6fe3e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Sun, 4 Jan 2015 15:43:47 +0100 Subject: [PATCH] st/mesa: fix GL_PRIMITIVE_RESTART_FIXED_INDEX Cc: 10.2 10.3 10.4 Reviewed-by: Kenneth Graunke --- src/mesa/state_tracker/st_draw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 64d6ef52514..b6ccdd7c232 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -40,6 +40,7 @@ #include "main/image.h" #include "main/bufferobj.h" #include "main/macros.h" +#include "main/varray.h" #include "vbo/vbo.h" @@ -234,7 +235,7 @@ st_draw_vbo(struct gl_context *ctx, * so we only set these fields for indexed drawing: */ info.primitive_restart = ctx->Array._PrimitiveRestart; - info.restart_index = ctx->Array.RestartIndex; + info.restart_index = _mesa_primitive_restart_index(ctx, ib->type); } else { /* Transform feedback drawing is always non-indexed. */ -- 2.30.2