diff options
author | Brian Paul <[email protected]> | 2009-05-21 16:57:28 -0600 |
---|---|---|
committer | Brian Paul <[email protected]> | 2009-05-21 16:57:28 -0600 |
commit | 7e2fb129816df48a103da3e4e6937530bd86cac8 (patch) | |
tree | 3692e601095314b5742239206c6d7656cfa8e5b9 /src/mesa/vbo | |
parent | 54a5ffbfa1f935c46642a9835f08983cc1fdfeed (diff) | |
parent | 8da09e6924ca22ba7951d5a7673dfab2a711a997 (diff) |
Merge branch 'mesa_7_5_branch'
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r-- | src/mesa/vbo/vbo_exec_array.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c index c33d557e926..66a4ed7a405 100644 --- a/src/mesa/vbo/vbo_exec_array.c +++ b/src/mesa/vbo/vbo_exec_array.c @@ -118,8 +118,11 @@ static void bind_array_obj( GLcontext *ctx ) for (i = 0; i < MAX_TEXTURE_COORD_UNITS; i++) exec->array.legacy_array[VERT_ATTRIB_TEX0 + i] = &arrayObj->TexCoord[i]; - for (i = 0; i < VERT_ATTRIB_MAX; i++) + for (i = 0; i < MAX_VERTEX_ATTRIBS; i++) { + assert(i < Elements(arrayObj->VertexAttrib)); + assert(i < Elements(exec->array.generic_array)); exec->array.generic_array[i] = &arrayObj->VertexAttrib[i]; + } exec->array.array_obj = arrayObj->Name; } @@ -216,7 +219,7 @@ static void recalculate_input_bindings( GLcontext *ctx ) } } - for (i = 0; i < 16; i++) { + for (i = 0; i < MAX_VERTEX_ATTRIBS; i++) { if (exec->array.generic_array[i]->Enabled) inputs[VERT_ATTRIB_GENERIC0 + i] = exec->array.generic_array[i]; else { |