gallium: add basic support for stream output queries
[mesa.git] / src / gallium / drivers / softpipe / sp_context.h
index 92607874b60912f4f0d3551be46b1d2615a87cfe..e641a81d1fb16ee510d79fe333e1c78e16645158 100644 (file)
@@ -50,6 +50,7 @@ struct softpipe_tex_tile_cache;
 struct sp_fragment_shader;
 struct sp_vertex_shader;
 struct sp_velems_state;
+struct sp_so_state;
 
 
 struct softpipe_context {
@@ -65,6 +66,7 @@ struct softpipe_context {
    struct sp_vertex_shader *vs;
    struct sp_geometry_shader *gs;
    struct sp_velems_state *velems;
+   struct sp_so_state *so;
 
    /** Other rendering state */
    struct pipe_blend_color blend_color;
@@ -78,6 +80,13 @@ struct softpipe_context {
    struct pipe_sampler_view *vertex_sampler_views[PIPE_MAX_VERTEX_SAMPLERS];
    struct pipe_viewport_state viewport;
    struct pipe_vertex_buffer vertex_buffer[PIPE_MAX_ATTRIBS];
+   struct {
+      struct softpipe_resource *buffer[PIPE_MAX_SO_BUFFERS];
+      int offset[PIPE_MAX_SO_BUFFERS];
+      int so_count[PIPE_MAX_SO_BUFFERS];
+      int num_buffers;
+   } so_target;
+   struct pipe_query_data_so_statistics so_stats;
 
    unsigned num_samplers;
    unsigned num_sampler_views;
@@ -109,6 +118,9 @@ struct softpipe_context {
    /** The reduced version of the primitive supplied by the state tracker */
    unsigned reduced_api_prim;
 
+   /** Derived information about which winding orders to cull */
+   unsigned cull_mode;
+
    /**
     * The reduced primitive after unfilled triangles, wide-line decomposition,
     * etc, are taken into account.  This is the primitive type that's actually
@@ -140,6 +152,8 @@ struct softpipe_context {
       struct sp_sampler_varient *frag_samplers_list[PIPE_MAX_SAMPLERS];
    } tgsi;
 
+   struct tgsi_exec_machine *fs_machine;
+
    /** The primitive drawing context */
    struct draw_context *draw;