mesa: check for no state change in glPrimitiveRestartIndex()

Reviewed-by: José Fonseca <jfonseca@vmware.com>
This commit is contained in:
Brian Paul 2012-02-19 19:50:32 -07:00
parent 45453d8f69
commit d2003ee7b7

View file

@ -1100,11 +1100,12 @@ _mesa_PrimitiveRestartIndex(GLuint index)
return;
}
ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
ASSERT_OUTSIDE_BEGIN_END(ctx);
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
ctx->Array.RestartIndex = index;
if (ctx->Array.RestartIndex != index) {
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
ctx->Array.RestartIndex = index;
}
}