diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-04-26 14:55:16 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-04-26 16:05:06 +0100 |
commit | 2a30d3d74a0b87f8066659952628ccd072a4e2b0 (patch) | |
tree | 740c6ec4af1014ac0260f02cd5eeda8b2a9ffec1 /src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c | |
parent | fc431a58dc1446383edc11aec2a0b7de5b363e5e (diff) | |
download | external_mesa3d-2a30d3d74a0b87f8066659952628ccd072a4e2b0.zip external_mesa3d-2a30d3d74a0b87f8066659952628ccd072a4e2b0.tar.gz external_mesa3d-2a30d3d74a0b87f8066659952628ccd072a4e2b0.tar.bz2 |
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.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c index 389e2b1..cbb5b6c 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_shade_emit.c @@ -167,7 +167,8 @@ static void fse_prepare( struct draw_pt_middle_end *middle, i, ((const ubyte *) draw->pt.user.vbuffer[i] + draw->pt.vertex_buffer[i].buffer_offset), - draw->pt.vertex_buffer[i].stride ); + draw->pt.vertex_buffer[i].stride, + draw->pt.vertex_buffer[i].max_index ); } *max_vertices = (draw->render->max_vertex_buffer_bytes / |