From: Zack Rusin Date: Thu, 13 Jun 2013 17:34:57 +0000 (-0400) Subject: draw: fix a regression in computing max elt X-Git-Tag: mesa-9.2.1~748 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F7030%2F1;p=platform%2Fupstream%2Fmesa.git 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 Reviewed-by: Jose Fonseca --- diff --git a/src/gallium/auxiliary/draw/draw_context.c b/src/gallium/auxiliary/draw/draw_context.c index 1fc6dbab..201c62d 100644 --- a/src/gallium/auxiliary/draw/draw_context.c +++ b/src/gallium/auxiliary/draw/draw_context.c @@ -138,6 +138,7 @@ boolean draw_init(struct draw_context *draw) draw->clip_z = TRUE; draw->pt.user.planes = (float (*) [DRAW_TOTAL_CLIP_PLANES][4]) &(draw->plane[0]); + draw->pt.user.eltMax = ~0; if (!draw_pipeline_init( draw )) return FALSE;