From 2ead49f98bcc18ab0ebc7942de78e280ec56d77a Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 22 May 2009 14:57:51 -0600 Subject: 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 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 55bfa2bf411..e3471123c65 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; -- cgit v1.2.3