diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2008-06-02 12:59:16 +0100 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2008-06-04 11:25:54 +0100 |
commit | 0a4aea0e86a897d9afb9f2a0ec27f03faf8f1b21 (patch) | |
tree | 9873d3bcf68cf71e2e5abc7b60f911ad73cc5f90 /src/gallium/auxiliary/draw/draw_pt_fetch_emit.c | |
parent | c218b8c6c6593f434a749bf67ad976007e6eef61 (diff) |
draw: respect driver's max vertex buffer size
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_fetch_emit.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_fetch_emit.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c index 09bdc5fb5e..083ce105bf 100644 --- a/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_fetch_emit.c @@ -90,7 +90,8 @@ struct fetch_emit_middle_end { static void fetch_emit_prepare( struct draw_pt_middle_end *middle, unsigned prim, - unsigned opt ) + unsigned opt, + unsigned *max_vertices ) { struct fetch_emit_middle_end *feme = (struct fetch_emit_middle_end *)middle; struct draw_context *draw = feme->draw; @@ -196,6 +197,9 @@ static void fetch_emit_prepare( struct draw_pt_middle_end *middle, draw->pt.vertex_buffer[i].buffer_offset), draw->pt.vertex_buffer[i].pitch ); } + + *max_vertices = (draw->render->max_vertex_buffer_bytes / + (vinfo->size * 4)); } |