[Mesa-dev] [PATCH 8/8] mesa: Delete the ctx->Array._RestartIndex derived state.
Kenneth Graunke
kenneth at whitecape.org
Tue May 28 14:31:19 PDT 2013
It's incorrect and isn't used any longer.
NOTE: This is a candidate for the 9.1 branch.
Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
---
src/mesa/main/attrib.c | 1 -
src/mesa/main/enable.c | 5 -----
src/mesa/main/mtypes.h | 4 +---
src/mesa/main/varray.c | 3 +--
4 files changed, 2 insertions(+), 11 deletions(-)
diff --git a/src/mesa/main/attrib.c b/src/mesa/main/attrib.c
index c118a94..249e88a 100644
--- a/src/mesa/main/attrib.c
+++ b/src/mesa/main/attrib.c
@@ -1399,7 +1399,6 @@ copy_array_attrib(struct gl_context *ctx,
dest->PrimitiveRestartFixedIndex = src->PrimitiveRestartFixedIndex;
dest->_PrimitiveRestart = src->_PrimitiveRestart;
dest->RestartIndex = src->RestartIndex;
- dest->_RestartIndex = src->_RestartIndex;
/* skip NewState */
/* skip RebindArrays */
diff --git a/src/mesa/main/enable.c b/src/mesa/main/enable.c
index 016e432..fdde24e 100644
--- a/src/mesa/main/enable.c
+++ b/src/mesa/main/enable.c
@@ -53,11 +53,6 @@ update_derived_primitive_restart_state(struct gl_context *ctx)
{
/* Update derived primitive restart state.
*/
- if (ctx->Array.PrimitiveRestart)
- ctx->Array._RestartIndex = ctx->Array.RestartIndex;
- else
- ctx->Array._RestartIndex = ~0;
-
ctx->Array._PrimitiveRestart = ctx->Array.PrimitiveRestart
|| ctx->Array.PrimitiveRestartFixedIndex;
}
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index e0e1886..882ebe1 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1534,15 +1534,13 @@ struct gl_array_attrib
* \name Primitive restart controls
*
* Primitive restart is enabled if either \c PrimitiveRestart or
- * \c PrimitiveRestartFixedIndex is set. If \c PrimitiveRestart is set,
- * then \c RestartIndex is used as the cut vertex. Otherwise ~0 is used.
+ * \c PrimitiveRestartFixedIndex is set.
*/
/*@{*/
GLboolean PrimitiveRestart;
GLboolean PrimitiveRestartFixedIndex;
GLboolean _PrimitiveRestart;
GLuint RestartIndex;
- GLuint _RestartIndex;
/*@}*/
/* GL_ARB_vertex_buffer_object */
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;
}
}
--
1.8.3
More information about the mesa-dev
mailing list