draw: Pass-through pipe_buffer::max_index to translate.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 26 Apr 2010 13:55:16 +0000 (14:55 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 26 Apr 2010 15:05:06 +0000 (16:05 +0100)
commit2a30d3d74a0b87f8066659952628ccd072a4e2b0
tree740c6ec4af1014ac0260f02cd5eeda8b2a9ffec1
parentfc431a58dc1446383edc11aec2a0b7de5b363e5e
draw: Pass-through pipe_buffer::max_index to translate.

max_index must be observed to prevent crashes due to bad index data.

I've been using this patch for some time without regressions.

Some places, where we use internal vertex buffer, it is not entirely
clear what max_index should be, so passing just ~0 to avoid regressions
for now.
src/gallium/auxiliary/draw/draw_pipe_vbuf.c
src/gallium/auxiliary/draw/draw_pt_emit.c
src/gallium/auxiliary/draw/draw_pt_fetch.c
src/gallium/auxiliary/draw/draw_pt_fetch_emit.c
src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c
src/gallium/auxiliary/draw/draw_vs.h
src/gallium/auxiliary/draw/draw_vs_varient.c