summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Olšák <marek.olsak@amd.com>2015-01-04 15:43:47 +0100
committerEmil Velikov <emil.l.velikov@gmail.com>2015-01-07 16:34:27 +0000
commite635510ce300bee897d0f067f042a1005b453b4b (patch)
treebb9a99fa9da35d737819d3f5bf0d69bcb85db6c8
parent2c26f5cc96463044c8bc035d4b362cc9d0453d3b (diff)
st/mesa: fix GL_PRIMITIVE_RESTART_FIXED_INDEX
Cc: 10.2 10.3 10.4 <mesa-stable@lists.freedesktop.org> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (cherry picked from commit eaae92a349af1fd6641c4bdd4bfd1185b1b6fe3e)
-rw-r--r--src/mesa/state_tracker/st_draw.c3
1 files changed, 2 insertions, 1 deletions
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. */