Merge branch 'mesa_7_5_branch'
[mesa.git] / src / mesa / main / state.c
index bfbefa55d44483d4764e352c5be353200125c834..d5bdb63a97bc342ec7630c91f1958cc69765aed0 100644 (file)
@@ -194,9 +194,9 @@ update_arrays( GLcontext *ctx )
 
    /* 16..31 */
    if (ctx->VertexProgram._Current) {
-      for (i = VERT_ATTRIB_GENERIC0; i < VERT_ATTRIB_MAX; i++) {
+      for (i = 0; i < Elements(arrayObj->VertexAttrib); i++) {
          if (arrayObj->VertexAttrib[i].Enabled) {
-            min = update_min(min, &arrayObj->VertexAttrib[i]);
+            min = MIN2(min, arrayObj->VertexAttrib[i]._MaxElement);
          }
       }
    }