From 8e3f6c0f96eb22198ec436990acc85d44aca7d8e Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Fri, 22 May 2009 14:42:26 -0600 Subject: mesa: use Elements() for loop limit --- src/mesa/vbo/vbo_exec_array.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/mesa/vbo/vbo_exec_array.c') diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index 1e1c0781c20..cbb9b239683 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -117,11 +117,10 @@ static void bind_array_obj( GLcontext *ctx ) } exec->array.legacy_array[VERT_ATTRIB_EDGEFLAG] = &arrayObj->EdgeFlag; - for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) + for (i = 0; i < Elements(arrayObj->TexCoord); i++) exec->array.legacy_array[VERT_ATTRIB_TEX0 + i] = &arrayObj->TexCoord[i]; - for (i = 0; i < MAX_VERTEX_GENERIC_ATTRIBS; i++) { - assert(i < Elements(arrayObj->VertexAttrib)); + for (i = 0; i < Elements(arrayObj->VertexAttrib); i++) { assert(i < Elements(exec->array.generic_array)); exec->array.generic_array[i] = &arrayObj->VertexAttrib[i]; } -- cgit v1.2.3