summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/draw/draw_private.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_private.h')
-rw-r--r--src/gallium/auxiliary/draw/draw_private.h52
1 files changed, 42 insertions, 10 deletions
diff --git a/src/gallium/auxiliary/draw/draw_private.h b/src/gallium/auxiliary/draw/draw_private.h
index a2bfb693c0..54944a7c67 100644
--- a/src/gallium/auxiliary/draw/draw_private.h
+++ b/src/gallium/auxiliary/draw/draw_private.h
@@ -81,6 +81,9 @@ struct vertex_header {
#define UNDEFINED_VERTEX_ID 0xffff
+/* maximum number of shader variants we can cache */
+#define DRAW_MAX_SHADER_VARIANTS 1024
+
/**
* Private context for the drawing module.
*/
@@ -235,6 +238,12 @@ struct draw_context
struct tgsi_sampler **samplers;
} gs;
+ struct {
+ struct pipe_stream_output_state state;
+ void *buffers[PIPE_MAX_SO_BUFFERS];
+ uint num_buffers;
+ } so;
+
/* Clip derived state:
*/
float plane[12][4];
@@ -259,6 +268,34 @@ struct draw_context
void *driver_private;
};
+
+struct draw_fetch_info {
+ boolean linear;
+ unsigned start;
+ const unsigned *elts;
+ unsigned count;
+};
+
+struct draw_vertex_info {
+ struct vertex_header *verts;
+ unsigned vertex_size;
+ unsigned stride;
+ unsigned count;
+};
+
+struct draw_prim_info {
+ boolean linear;
+ unsigned start;
+
+ const ushort *elts;
+ unsigned count;
+
+ unsigned prim;
+ unsigned *primitive_lengths;
+ unsigned primitive_count;
+};
+
+
/*******************************************************************************
* Draw common initialization code
*/
@@ -336,18 +373,13 @@ void draw_pipeline_destroy( struct draw_context *draw );
#define DRAW_PIPE_FLAG_MASK (0xf<<12)
void draw_pipeline_run( struct draw_context *draw,
- unsigned prim,
- struct vertex_header *vertices,
- unsigned vertex_count,
- unsigned stride,
- const ushort *elts,
- unsigned count );
+ const struct draw_vertex_info *vert,
+ const struct draw_prim_info *prim);
void draw_pipeline_run_linear( struct draw_context *draw,
- unsigned prim,
- struct vertex_header *vertices,
- unsigned count,
- unsigned stride );
+ const struct draw_vertex_info *vert,
+ const struct draw_prim_info *prim);
+