diff options
-rw-r--r-- | src/mesa/vbo/vbo_exec_array.c | 5 |
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]; } |