aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/vbo/vbo_exec_draw.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-12-22 17:33:44 +0000
committermarha <marha@users.sourceforge.net>2009-12-22 17:33:44 +0000
commitb729d9e1cc1c60e415da24143cabcbaccb525ed7 (patch)
tree54fc81d1a046dc5ec6f4aa2a2d8a2ad015c423fd /mesalib/src/mesa/vbo/vbo_exec_draw.c
parent0695dfb71ca6fe132d15a4d0890e8a868183adf9 (diff)
downloadvcxsrv-b729d9e1cc1c60e415da24143cabcbaccb525ed7.tar.gz
vcxsrv-b729d9e1cc1c60e415da24143cabcbaccb525ed7.tar.bz2
vcxsrv-b729d9e1cc1c60e415da24143cabcbaccb525ed7.zip
Updated to mesa_7_6_1_rc1
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)) {