glsl: Change _mesa_glsl_parse_state ctor to use gl_shader_stage enum.
[mesa.git] / src / mesa / main / varray.c
index 1009bb8927987fed9e630140dcb067a7a1979fb6..0f38270d5d9705dc90fb003b815a184e97262dba 100644 (file)
@@ -315,13 +315,13 @@ update_array_format(struct gl_context *ctx,
                   "%s(relativeOffset=%d > "
                   "GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET)",
                   func, relativeOffset);
-      return GL_FALSE;
+      return false;
    }
 
    if (ctx->Extensions.ARB_vertex_type_10f_11f_11f_rev &&
          type == GL_UNSIGNED_INT_10F_11F_11F_REV && size != 3) {
       _mesa_error(ctx, GL_INVALID_OPERATION, "%s(size=%d)", func, size);
-      return;
+      return false;
    }
 
    ASSERT(size <= 4);
@@ -390,11 +390,6 @@ update_array(struct gl_context *ctx,
       return;
    }
 
-   if (!update_array_format(ctx, func, attrib, legalTypesMask, sizeMin, sizeMax,
-                            size, type, normalized, integer, 0)) {
-      return;
-   }
-
    if (stride < 0) {
       _mesa_error( ctx, GL_INVALID_VALUE, "%s(stride=%d)", func, stride );
       return;
@@ -418,6 +413,11 @@ update_array(struct gl_context *ctx,
       return;
    }
 
+   if (!update_array_format(ctx, func, attrib, legalTypesMask, sizeMin,
+                            sizeMax, size, type, normalized, integer, 0)) {
+      return;
+   }
+
    /* Reset the vertex attrib binding */
    vertex_attrib_binding(ctx, attrib, attrib);