i965: Make sure we always compute valid index bounds before drawing.
authorIago Toral Quiroga <itoral@igalia.com>
Fri, 28 Mar 2014 07:14:02 +0000 (08:14 +0100)
committerKenneth Graunke <kenneth@whitecape.org>
Fri, 28 Mar 2014 15:48:14 +0000 (08:48 -0700)
commit029ccd773d01a5f801c809c499516d7b0c4cc3f8
tree5a9e13a3c5a02e2e532c23d8399c95a0d83b9f37
parente7f75745984937d004bf3ce08a2a8fd2149801d1
i965: Make sure we always compute valid index bounds before drawing.

When doing software rendering (i.e. rendering to the selection buffer) we need
to make sure that we have valid index bounds before calling _tnl_draw_prims(),
otherwise we can crash.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59455
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
src/mesa/drivers/dri/i965/brw_draw.c