draw: fix a regression in computing max elt
authorZack Rusin <zackr@vmware.com>
Thu, 13 Jun 2013 17:34:57 +0000 (13:34 -0400)
committerZack Rusin <zackr@vmware.com>
Mon, 17 Jun 2013 15:06:39 +0000 (11:06 -0400)
commit7807763dd84ae381e208f74a0f4b7476b70ffbe8
tree5dccb46fa03dd492cd99a63ba8ebd134dd607217
parent41966fdb3b71c0b70aeb095e0eb3c5626c144a3a
draw: fix a regression in computing max elt

gl can use elts without setting indices, in which case
our eltMax was set to 0 and always invoking the overflow
condition. So by default set eltMax to maximum, it will
be curbed by draw_set_indexes (if it ever comes) and if
not then it will let gl's glVertexPointer/glDrawArrays
work correctly. Fixes piglit's
triangle-rasterization-overdraw test.

Signed-off-by: Zack Rusin <zackr@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/auxiliary/draw/draw_context.c