diff options
author | Dave Airlie <airlied@redhat.com> | 2009-06-18 13:20:32 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2009-06-18 13:25:38 +1000 |
commit | 46000cecc32104702fcb0de5a842d11b18c41c6b (patch) | |
tree | 96a64b22c36d4df9e999f5836061e46eea3d36e9 /src/mesa/drivers/dri/r300/r300_draw.c | |
parent | bd10f0e84f1491363d76d92dcbd410ab5cc43dbe (diff) |
r300: use vbo_split_prims to split up large vertex buffers.
This lets ut2004 avoid hitting the elt warning.
Diffstat (limited to 'src/mesa/drivers/dri/r300/r300_draw.c')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_draw.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_draw.c b/src/mesa/drivers/dri/r300/r300_draw.c index cc5650fb7c..92bb0ee338 100644 --- a/src/mesa/drivers/dri/r300/r300_draw.c +++ b/src/mesa/drivers/dri/r300/r300_draw.c @@ -452,12 +452,21 @@ static void r300DrawPrims(GLcontext *ctx, GLuint min_index, GLuint max_index) { + struct split_limits limits; GLboolean retval; + limits.max_verts = 65535; + limits.max_indices = 65535; + limits.max_vb_size = 1024*1024; + if (min_index) { vbo_rebase_prims( ctx, arrays, prim, nr_prims, ib, min_index, max_index, r300DrawPrims ); return; } + if ((ib && ib->count > 65536)) { + vbo_split_prims (ctx, arrays, prim, nr_prims, ib, min_index, max_index, r300DrawPrims, &limits); + return; + } /* Make an attempt at drawing */ retval = r300TryDrawPrims(ctx, arrays, prim, nr_prims, ib, min_index, max_index); |