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 <brianp@vmware.com>
This commit is contained in:
José Fonseca 2012-11-16 17:09:05 +00:00
parent d1864273f2
commit 7da3a947c7

View file

@ -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,