From: José Fonseca Date: Fri, 16 Nov 2012 17:09:05 +0000 (+0000) Subject: draw: Properly limit vertex buffer fetches on draw arrays. X-Git-Tag: accepted/2.0alpha-wayland/20130301.050525~58 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4a0423e1bd2ba287f7c0599d1a9b80d9206f14cb;p=profile%2Fivi%2Fmesa.git draw: Properly limit vertex buffer fetches on draw arrays. We need to clamp vertex buffer fetch based on its size, not based on the user specified max index hint. This matches draw_pt_fetch_run() above. NOTE: This is a candidate for the stable branches. Reviewed-by: Brian Paul (cherry picked from commit 7da3a947c72111dfb605781be6c0d61423b56e76) --- diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch.c b/src/gallium/auxiliary/draw/draw_pt_fetch.c index a6cc183..9fab7b6 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch.c @@ -189,7 +189,7 @@ draw_pt_fetch_run_linear(struct pt_fetch *fetch, ((char *)draw->pt.user.vbuffer[i] + draw->pt.vertex_buffer[i].buffer_offset), draw->pt.vertex_buffer[i].stride, - draw->pt.user.max_index + draw->pt.user.eltBias); + draw->pt.max_index); } translate->run( translate,