Mesa (master): mesa: check for no state change in glPrimitiveRestartIndex()
Brian Paul
brianp at kemper.freedesktop.org
Mon Feb 20 15:04:59 UTC 2012
Module: Mesa
Branch: master
Commit: d2003ee7b7b4ab39144904d38167ed1a0d7d266d
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d2003ee7b7b4ab39144904d38167ed1a0d7d266d
Author: Brian Paul <brianp at vmware.com>
Date: Sun Feb 19 19:50:32 2012 -0700
mesa: check for no state change in glPrimitiveRestartIndex()
Reviewed-by: José Fonseca <jfonseca at vmware.com>
---
src/mesa/main/varray.c | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index 93f6fcd..39d3a27 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;
+ }
}
More information about the mesa-commit
mailing list