aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-02-19 19:50:32 -0700
committerBrian Paul <[email protected]>2012-02-20 08:04:34 -0700
commitd2003ee7b7b4ab39144904d38167ed1a0d7d266d (patch)
treec753f6730305451d6ccf21ac4538209e6fe67cdb /src/mesa/main
parent45453d8f69a8e7d4088c71d238228c142e3be59f (diff)
mesa: check for no state change in glPrimitiveRestartIndex()
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/varray.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 93f6fcd9bea..39d3a27e053 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -1100,11 +1100,12 @@ _mesa_PrimitiveRestartIndex(GLuint index)
return;
}
- ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
-
- FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
- ctx->Array.RestartIndex = index;
+ if (ctx->Array.RestartIndex != index) {
+ FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
+ ctx->Array.RestartIndex = index;
+ }
}