gallium: a lot more complete implementation of stream output
[mesa.git] / src / gallium / auxiliary / draw / draw_context.h
index b716209df299019b0c309ff94730507b235522c0..103d6538b8156ae3b50a36b7f8d3da19ab96d5e3 100644 (file)
@@ -40,7 +40,6 @@
 
 #include "pipe/p_state.h"
 
-
 struct pipe_context;
 struct draw_context;
 struct draw_stage;
@@ -49,7 +48,7 @@ struct draw_geometry_shader;
 struct tgsi_sampler;
 
 
-struct draw_context *draw_create( void );
+struct draw_context *draw_create( struct pipe_context *pipe );
 
 void draw_destroy( struct draw_context *draw );
 
@@ -60,13 +59,16 @@ void draw_set_clip_state( struct draw_context *pipe,
                           const struct pipe_clip_state *clip );
 
 void draw_set_rasterizer_state( struct draw_context *draw,
-                                const struct pipe_rasterizer_state *raster );
+                                const struct pipe_rasterizer_state *raster,
+                                void *rast_handle );
 
 void draw_set_rasterize_stage( struct draw_context *draw,
                                struct draw_stage *stage );
 
 void draw_wide_point_threshold(struct draw_context *draw, float threshold);
 
+void draw_wide_point_sprites(struct draw_context *draw, boolean draw_sprite);
+
 void draw_wide_line_threshold(struct draw_context *draw, float threshold);
 
 void draw_enable_line_stipple(struct draw_context *draw, boolean enable);
@@ -140,21 +142,33 @@ void draw_set_vertex_elements(struct draw_context *draw,
 void
 draw_set_mapped_element_buffer_range( struct draw_context *draw,
                                       unsigned eltSize,
+                                      int eltBias,
                                       unsigned min_index,
                                       unsigned max_index,
                                       const void *elements );
 
 void draw_set_mapped_element_buffer( struct draw_context *draw,
                                      unsigned eltSize, 
+                                     int eltBias,
                                      const void *elements );
 
 void draw_set_mapped_vertex_buffer(struct draw_context *draw,
                                    unsigned attr, const void *buffer);
 
-void draw_set_mapped_constant_buffer(struct draw_context *draw,
-                                     unsigned shader_type,
-                                     const void *buffer,
-                                     unsigned size );
+void
+draw_set_mapped_constant_buffer(struct draw_context *draw,
+                                unsigned shader_type,
+                                unsigned slot,
+                                const void *buffer,
+                                unsigned size);
+
+void
+draw_set_mapped_so_buffers(struct draw_context *draw,
+                           void *buffers[PIPE_MAX_SO_BUFFERS],
+                           unsigned num_buffers);
+void
+draw_set_so_state(struct draw_context *draw,
+                  struct pipe_stream_output_state *state);
 
 
 /***********************************************************************
@@ -164,6 +178,14 @@ void draw_set_mapped_constant_buffer(struct draw_context *draw,
 void draw_arrays(struct draw_context *draw, unsigned prim,
                 unsigned start, unsigned count);
 
+void
+draw_arrays_instanced(struct draw_context *draw,
+                      unsigned mode,
+                      unsigned start,
+                      unsigned count,
+                      unsigned startInstance,
+                      unsigned instanceCount);
+
 void draw_flush(struct draw_context *draw);
 
 
@@ -187,6 +209,4 @@ boolean draw_need_pipeline(const struct draw_context *draw,
                            const struct pipe_rasterizer_state *rasterizer,
                            unsigned prim );
 
-
-
 #endif /* DRAW_CONTEXT_H */