Mesa (master): mesa: reduce gl_array_object::VertexAttrib[] array from 32 to 16 elements

Brian Paul brianp at kemper.freedesktop.org
Fri May 22 21:02:16 UTC 2009


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

Author: Brian Paul <brianp at vmware.com>
Date:   Fri May 22 14:57:51 2009 -0600

mesa: reduce gl_array_object::VertexAttrib[] array from 32 to 16 elements

This array was mistakenly dimensioned with VERT_ATTRIB_MAX (32) but it
should really be MAX_VERTEX_GENERIC_ATTRIBS (16).

The generic vertex attributes are in addition to the conventional arrays
(except in NV vertex program mode- they alias/overlay in that case) so
the total of all conventional attributes plus generic attributes should
total 32 (not 48).

---

 src/mesa/main/mtypes.h |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 55bfa2b..e347112 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1574,8 +1574,13 @@ struct gl_array_object
    struct gl_client_array PointSize;
    /*@}*/
 
-   /** Generic arrays for vertex programs/shaders */
-   struct gl_client_array VertexAttrib[VERT_ATTRIB_MAX];
+   /**
+    * Generic arrays for vertex programs/shaders.
+    * For NV vertex programs, these attributes alias and take priority
+    * over the conventional attribs above.  For ARB vertex programs and
+    * GLSL vertex shaders, these attributes are separate.
+    */
+   struct gl_client_array VertexAttrib[MAX_VERTEX_GENERIC_ATTRIBS];
 
    /** Mask of _NEW_ARRAY_* values indicating which arrays are enabled */
    GLbitfield _Enabled;




More information about the mesa-commit mailing list