summaryrefslogtreecommitdiffstats
path: root/src/mesa/vbo/vbo_exec_array.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2009-05-22 14:42:26 -0600
committerBrian Paul <[email protected]>2009-05-22 14:42:26 -0600
commit8e3f6c0f96eb22198ec436990acc85d44aca7d8e (patch)
tree5f069b2f27aa216019cd14d54254bbe373bf3498 /src/mesa/vbo/vbo_exec_array.c
parent842b4cd3cdb313751647e229a9aa3f0001e03d15 (diff)
mesa: use Elements() for loop limit
Diffstat (limited to 'src/mesa/vbo/vbo_exec_array.c')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c5
1 files changed, 2 insertions, 3 deletions
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];
}