summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/draw/draw_private.h
diff options
context:
space:
mode:
authorKeith Whitwell <[email protected]>2007-09-26 11:56:17 +0100
committerKeith Whitwell <[email protected]>2007-09-27 07:56:23 +0100
commit08589f71051e588b0bb7d0c8b529976c85398dd1 (patch)
tree294a567114f73cd51fc92e6553230a76867905ad /src/mesa/pipe/draw/draw_private.h
parent7770acf8d4360ecfcaeece6e366f5adc6c0c9dee (diff)
Make flushing more lazy in the draw module.
Diffstat (limited to 'src/mesa/pipe/draw/draw_private.h')
-rw-r--r--src/mesa/pipe/draw/draw_private.h23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/mesa/pipe/draw/draw_private.h b/src/mesa/pipe/draw/draw_private.h
index 04d38c4e0c2..ebef5347ab9 100644
--- a/src/mesa/pipe/draw/draw_private.h
+++ b/src/mesa/pipe/draw/draw_private.h
@@ -126,6 +126,8 @@ struct draw_context
struct {
struct draw_stage *first; /**< one of the following */
+ struct draw_stage *validate;
+
/* stages (in logical order) */
struct draw_stage *feedback;
struct draw_stage *flatshade;
@@ -171,13 +173,10 @@ struct draw_context
uint attrib_front0, attrib_back0;
uint attrib_front1, attrib_back1;
- unsigned nr_vertices;
-
+ unsigned drawing;
unsigned prim; /**< current prim type: PIPE_PRIM_x */
unsigned reduced_prim;
- struct vertex_header *(*get_vertex)( struct draw_context *draw,
- unsigned i );
/* Post-tnl vertex cache:
*/
@@ -186,6 +185,9 @@ struct draw_context
unsigned idx[VCACHE_SIZE + VCACHE_OVERFLOW];
struct vertex_header *vertex[VCACHE_SIZE + VCACHE_OVERFLOW];
unsigned overflow;
+
+ struct vertex_header *(*get_vertex)( struct draw_context *draw,
+ unsigned i );
} vcache;
/* Vertex shader queue:
@@ -219,6 +221,7 @@ extern struct draw_stage *draw_offset_stage( struct draw_context *context );
extern struct draw_stage *draw_clip_stage( struct draw_context *context );
extern struct draw_stage *draw_flatshade_stage( struct draw_context *context );
extern struct draw_stage *draw_cull_stage( struct draw_context *context );
+extern struct draw_stage *draw_validate_stage( struct draw_context *context );
extern void draw_free_tmps( struct draw_stage *stage );
@@ -228,7 +231,6 @@ extern void draw_alloc_tmps( struct draw_stage *stage, unsigned nr );
extern int draw_vertex_cache_check_space( struct draw_context *draw,
unsigned nr_verts );
-extern void draw_vertex_cache_validate( struct draw_context *draw );
extern void draw_vertex_cache_invalidate( struct draw_context *draw );
extern void draw_vertex_cache_unreference( struct draw_context *draw );
extern void draw_vertex_cache_reset_vertex_ids( struct draw_context *draw );
@@ -244,6 +246,17 @@ extern void draw_vertex_fetch( struct draw_context *draw,
unsigned count );
+#define DRAW_FLUSH_PRIM_QUEUE 0x1
+#define DRAW_FLUSH_VERTEX_CACHE_INVALIDATE 0x2
+#define DRAW_FLUSH_DRAW 0x4
+
+
+void draw_do_flush( struct draw_context *draw,
+ unsigned flags );
+
+
+
+
/**
* Get a writeable copy of a vertex.
* \param stage drawing stage info