summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2013-11-11 15:06:13 -0700
committerBrian Paul <[email protected]>2013-11-12 11:05:19 -0700
commitce193d4f01baa7f88692164f5673606de162f483 (patch)
treea0d2e2e86ae3a4ad5e1307b9a346c3be373a4143 /src/mesa/main
parent5f22f3207e298f53aaf8c965a39f758578a28600 (diff)
mesa: call update_array_format() after error checking
We try to do all error checking before changing any GL state. Cc: "10.0" <[email protected]> Jordan Justen <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/varray.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index d17d698d3fb..0f38270d5d9 100644
--- a/src/mesa/main/varray.c
+++ b/src/mesa/main/varray.c
@@ -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);