mesa: Ignore fixed-index primitive restart in ArrayElement().
authorKenneth Graunke <kenneth@whitecape.org>
Wed, 29 May 2013 15:29:26 +0000 (08:29 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 29 May 2013 21:22:14 +0000 (14:22 -0700)
GL_PRIMITIVE_RESTART_FIXED_INDEX is only supposed to apply to
glDrawElements*.  This code is for legacy drawing paths and display
lists, so it shouldn't apply.

NOTE: This is a candidate for the 9.1 branch.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/mesa/main/api_arrayelt.c

index bd55f8e432290c4e4a9616980c5d777147663dae..8e581c8d9c6806e673d8cc3983f387c3ebe394b5 100644 (file)
@@ -1666,7 +1666,7 @@ _ae_ArrayElement(GLint elt)
    /* If PrimitiveRestart is enabled and the index is the RestartIndex
     * then we call PrimitiveRestartNV and return.
     */
-   if (ctx->Array._PrimitiveRestart && (elt == ctx->Array._RestartIndex)) {
+   if (ctx->Array.PrimitiveRestart && (elt == ctx->Array.RestartIndex)) {
       CALL_PrimitiveRestartNV((struct _glapi_table *)disp, ());
       return;
    }