diff options
author | Keith Whitwell <keith@tungstengraphics.com> | 2007-09-26 11:56:17 +0100 |
---|---|---|
committer | Keith Whitwell <keith@tungstengraphics.com> | 2007-09-27 07:56:23 +0100 |
commit | 08589f71051e588b0bb7d0c8b529976c85398dd1 (patch) | |
tree | 294a567114f73cd51fc92e6553230a76867905ad /src/mesa/pipe/softpipe | |
parent | 7770acf8d4360ecfcaeece6e366f5adc6c0c9dee (diff) |
Make flushing more lazy in the draw module.
Diffstat (limited to 'src/mesa/pipe/softpipe')
-rw-r--r-- | src/mesa/pipe/softpipe/sp_draw_arrays.c | 17 | ||||
-rw-r--r-- | src/mesa/pipe/softpipe/sp_prim_setup.c | 2 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/mesa/pipe/softpipe/sp_draw_arrays.c b/src/mesa/pipe/softpipe/sp_draw_arrays.c index 7ea29a0a26..21c30b53f3 100644 --- a/src/mesa/pipe/softpipe/sp_draw_arrays.c +++ b/src/mesa/pipe/softpipe/sp_draw_arrays.c @@ -95,14 +95,16 @@ softpipe_draw_elements(struct pipe_context *pipe, { struct softpipe_context *sp = softpipe_context(pipe); struct draw_context *draw = sp->draw; - unsigned length, first, incr, i; + unsigned i; - /* first, check that the primitive is not malformed */ - draw_prim_info( mode, &first, &incr ); - length = draw_trim( count, first, incr ); - if (!length) - return TRUE; + /* first, check that the primitive is not malformed. It is the + * state tracker's responsibility to do send only correctly formed + * primitives down. + */ +// count = draw_trim_prim( mode, count ); + if (!draw_validate_prim( mode, count )) + assert(0); if (sp->dirty) softpipe_update_derived( sp ); @@ -151,6 +153,9 @@ softpipe_draw_elements(struct pipe_context *pipe, /* draw! */ draw_arrays(draw, mode, start, count); + /* always flush for now */ + draw_flush(draw); + /* * unmap vertex/index buffers */ diff --git a/src/mesa/pipe/softpipe/sp_prim_setup.c b/src/mesa/pipe/softpipe/sp_prim_setup.c index 2e27d00acf..621a44512c 100644 --- a/src/mesa/pipe/softpipe/sp_prim_setup.c +++ b/src/mesa/pipe/softpipe/sp_prim_setup.c @@ -41,7 +41,7 @@ #include "pipe/draw/draw_vertex.h" #include "pipe/p_util.h" -#define DEBUG_VERTS 0 +#define DEBUG_VERTS 1 /** * Triangle edge info |