aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/vbo/vbo_exec_draw.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-12-22 18:18:58 +0000
committermarha <marha@users.sourceforge.net>2009-12-22 18:18:58 +0000
commit3b79162ea5c5be078326f2e0ea85b0f84c02f166 (patch)
tree6826d1ef026f16ec12d35ee6bd4a892d0a05b7e0 /mesalib/src/mesa/vbo/vbo_exec_draw.c
parent4284aeba874b9168f2228c59639bec8346a56796 (diff)
parentb729d9e1cc1c60e415da24143cabcbaccb525ed7 (diff)
downloadvcxsrv-3b79162ea5c5be078326f2e0ea85b0f84c02f166.tar.gz
vcxsrv-3b79162ea5c5be078326f2e0ea85b0f84c02f166.tar.bz2
vcxsrv-3b79162ea5c5be078326f2e0ea85b0f84c02f166.zip
svn merge ^/branches/released
Diffstat (limited to 'mesalib/src/mesa/vbo/vbo_exec_draw.c')
-rw-r--r--mesalib/src/mesa/vbo/vbo_exec_draw.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/mesalib/src/mesa/vbo/vbo_exec_draw.c b/mesalib/src/mesa/vbo/vbo_exec_draw.c
index 0c258c535..f41d62945 100644
--- a/mesalib/src/mesa/vbo/vbo_exec_draw.c
+++ b/mesalib/src/mesa/vbo/vbo_exec_draw.c
@@ -172,6 +172,7 @@ vbo_exec_bind_arrays( GLcontext *ctx )
exec->vtx.inputs[attr] = &vbo->legacy_currval[attr];
}
for (attr = 0; attr < MAT_ATTRIB_MAX; attr++) {
+ ASSERT(attr + 16 < Elements(exec->vtx.inputs));
exec->vtx.inputs[attr + 16] = &vbo->mat_currval[attr];
}
map = vbo->map_vp_none;
@@ -184,6 +185,7 @@ vbo_exec_bind_arrays( GLcontext *ctx )
*/
for (attr = 0; attr < 16; attr++) {
exec->vtx.inputs[attr] = &vbo->legacy_currval[attr];
+ ASSERT(attr + 16 < Elements(exec->vtx.inputs));
exec->vtx.inputs[attr + 16] = &vbo->generic_currval[attr];
}
map = vbo->map_vp_arb;
@@ -212,6 +214,8 @@ vbo_exec_bind_arrays( GLcontext *ctx )
if (exec->vtx.attrsz[src]) {
/* override the default array set above */
+ ASSERT(attr < Elements(exec->vtx.inputs));
+ ASSERT(attr < Elements(exec->vtx.arrays)); /* arrays[] */
exec->vtx.inputs[attr] = &arrays[attr];
if (_mesa_is_bufferobj(exec->vtx.bufferobj)) {