summaryrefslogtreecommitdiff
path: root/src/mesa/vbo
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-05-21 16:57:28 -0600
committerBrian Paul <brianp@vmware.com>2009-05-21 16:57:28 -0600
commit7e2fb129816df48a103da3e4e6937530bd86cac8 (patch)
tree3692e601095314b5742239206c6d7656cfa8e5b9 /src/mesa/vbo
parent54a5ffbfa1f935c46642a9835f08983cc1fdfeed (diff)
parent8da09e6924ca22ba7951d5a7673dfab2a711a997 (diff)
Merge branch 'mesa_7_5_branch'
Diffstat (limited to 'src/mesa/vbo')
-rw-r--r--src/mesa/vbo/vbo_exec_array.c7
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 c33d557e92..66a4ed7a40 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 {