Mesa (master): mesa: call update_array_format() after error checking

Brian Paul brianp at kemper.freedesktop.org
Tue Nov 12 18:57:26 UTC 2013


Module: Mesa
Branch: master
Commit: ce193d4f01baa7f88692164f5673606de162f483
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ce193d4f01baa7f88692164f5673606de162f483

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Nov 11 15:06:13 2013 -0700

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 at lists.freedesktop.org>

Jordan Justen <jordan.l.justen at intel.com>

---

 src/mesa/main/varray.c |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/mesa/main/varray.c b/src/mesa/main/varray.c
index d17d698..0f38270 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);
 




More information about the mesa-commit mailing list