[Mesa-dev] [PATCH 8/8] mesa: Delete the ctx->Array._RestartIndex derived state.

Eric Anholt eric at anholt.net
Tue May 28 16:06:11 PDT 2013


Kenneth Graunke <kenneth at whitecape.org> writes:
> diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
> index dff0070..5f10f0c 100644
> --- a/src/mesa/main/varray.c
> +++ b/src/mesa/main/varray.c
> @@ -1110,9 +1110,8 @@ _mesa_PrimitiveRestartIndex(GLuint index)
>     }
>  
>     ctx->Array.RestartIndex = index;
> -   if (ctx->Array.PrimitiveRestart && ctx->Array._RestartIndex != index) {
> +   if (ctx->Array.PrimitiveRestart && ctx->Array.RestartIndex != index) {
>        FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
> -      ctx->Array._RestartIndex = index;
>     }
>  }

I don't think your conditional will ever trigger now.  I think you want
to just move the "ctx->Array.RestartIndex = index" inside the block, so
that previously-queued drawing is successfully flushed with the old
restart index, not the new one.

Other than that, this series is:

Reviewed-by: Eric Anholt <eric at anholt.net>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130528/bb240487/attachment.pgp>


More information about the mesa-dev mailing list