summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/softpipe/sp_draw_arrays.c
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-08-20 11:49:16 -0600
committerBrian <[email protected]>2007-08-20 11:49:16 -0600
commit98d30cb2d4e17c288ef5f0fd41c09b372832d783 (patch)
treee4b23fbbd8172a0b52c048dc657ba9558546f55c /src/mesa/pipe/softpipe/sp_draw_arrays.c
parent904163e4e94dbf3ea9a24738077e9916e97191f8 (diff)
call draw_trim()
Diffstat (limited to 'src/mesa/pipe/softpipe/sp_draw_arrays.c')
-rw-r--r--src/mesa/pipe/softpipe/sp_draw_arrays.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/pipe/softpipe/sp_draw_arrays.c b/src/mesa/pipe/softpipe/sp_draw_arrays.c
index a7fb39ca093..5371ef58e69 100644
--- a/src/mesa/pipe/softpipe/sp_draw_arrays.c
+++ b/src/mesa/pipe/softpipe/sp_draw_arrays.c
@@ -318,8 +318,9 @@ softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
{
struct softpipe_context *sp = softpipe_context(pipe);
struct draw_context *draw = sp->draw;
- unsigned int i;
+ unsigned length, first, incr, i;
+ printf("Draw arrays start %u count %u\n", start, count);
if (sp->dirty)
softpipe_update_derived( sp );
@@ -346,10 +347,13 @@ softpipe_draw_arrays(struct pipe_context *pipe, unsigned mode,
draw_invalidate_vcache( draw );
draw_set_element_buffer(draw, 0, NULL); /* no index/element buffer */
- draw_set_prim( draw, mode );
- /* XXX draw_prim_info() and TRIM here */
- draw_prim(draw, start, count);
+ draw_prim_info( mode, &first, &incr );
+ length = draw_trim( count, first, incr );
+ if (length) {
+ draw_set_prim( draw, mode );
+ draw_prim(draw, start, count);
+ }
/* draw any left-over buffered prims */
draw_flush(draw);