From: Marek Olšák Date: Sun, 4 Jan 2015 14:43:47 +0000 (+0100) Subject: st/mesa: fix GL_PRIMITIVE_RESTART_FIXED_INDEX X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=eaae92a349af1fd6641c4bdd4bfd1185b1b6fe3e;p=mesa.git st/mesa: fix GL_PRIMITIVE_RESTART_FIXED_INDEX Cc: 10.2 10.3 10.4 Reviewed-by: Kenneth Graunke --- 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. */