mesa: call update_array_format() after error checking

We try to do all error checking before changing any GL state.

Cc: "10.0" <mesa-stable@lists.freedesktop.org>

Jordan Justen <jordan.l.justen@intel.com>
This commit is contained in:
Brian Paul 2013-11-11 15:06:13 -07:00
parent 5f22f3207e
commit ce193d4f01

View file

@ -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);