summaryrefslogtreecommitdiff
path: root/src/mesa/main/state.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/state.c')
-rw-r--r--src/mesa/main/state.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/main/state.c b/src/mesa/main/state.c
index 761a45f2bd..34eb2c3b8a 100644
--- a/src/mesa/main/state.c
+++ b/src/mesa/main/state.c
@@ -881,9 +881,13 @@ update_arrays( GLcontext *ctx )
/* 6 */
if (ctx->VertexProgram._Enabled
- && ctx->Array.VertexAttrib[VERT_ATTRIB_SIX].Enabled) {
- min = MIN2(min, ctx->Array.VertexAttrib[VERT_ATTRIB_SIX]._MaxElement);
+ && ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR_INDEX].Enabled) {
+ min = MIN2(min, ctx->Array.VertexAttrib[VERT_ATTRIB_COLOR_INDEX]._MaxElement);
}
+ else if (ctx->Array.Index.Enabled) {
+ min = MIN2(min, ctx->Array.Index._MaxElement);
+ }
+
/* 7 */
if (ctx->VertexProgram._Enabled
@@ -912,10 +916,6 @@ update_arrays( GLcontext *ctx )
}
}
- if (ctx->Array.Index.Enabled) {
- min = MIN2(min, ctx->Array.Index._MaxElement);
- }
-
if (ctx->Array.EdgeFlag.Enabled) {
min = MIN2(min, ctx->Array.EdgeFlag._MaxElement);
}