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_emit.c | |
parent | c218b8c6c6593f434a749bf67ad976007e6eef61 (diff) |
draw: respect driver's max vertex buffer size
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt_emit.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt_emit.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_emit.c b/src/gallium/auxiliary/draw/draw_pt_emit.c index cf87cde996..a02f1f46fe 100644 --- a/src/gallium/auxiliary/draw/draw_pt_emit.c +++ b/src/gallium/auxiliary/draw/draw_pt_emit.c @@ -46,7 +46,8 @@ struct pt_emit { }; void draw_pt_emit_prepare( struct pt_emit *emit, - unsigned prim ) + unsigned prim, + unsigned *max_vertices ) { struct draw_context *draw = emit->draw; const struct vertex_info *vinfo; @@ -139,6 +140,9 @@ void draw_pt_emit_prepare( struct pt_emit *emit, translate_key_sanitize(&hw_key); emit->translate = translate_cache_find(emit->cache, &hw_key); } + + *max_vertices = (draw->render->max_vertex_buffer_bytes / + (vinfo->size * 4)); } |