Merge branch 'master' into radeon-rewrite
[mesa.git] / src / gallium / drivers / softpipe / sp_state.h
index 5aaa9e346bcfb5d94d9752e5b6f728faf0e373cd..9776e978e3e8f9e40027b2cbfd08c1f81fc4d584 100644 (file)
@@ -32,6 +32,7 @@
 #define SP_STATE_H
 
 #include "pipe/p_state.h"
+#include "tgsi/tgsi_scan.h"
 
 
 #define SP_NEW_VIEWPORT      0x1
 
 
 struct tgsi_sampler;
-struct tgsi_interp_coef;
 struct tgsi_exec_machine;
+struct vertex_info;
 
 
-/** Subclass of pipe_shader_state (though it doesn't really need to be).
+/**
+ * Subclass of pipe_shader_state (though it doesn't really need to be).
  *
  * This is starting to look an awful lot like a quad pipeline stage...
  */
 struct sp_fragment_shader {
-   struct pipe_shader_state   shader;
+   struct pipe_shader_state shader;
 
-   boolean uses_kill;
-   boolean writes_z;
+   struct tgsi_shader_info info;
 
    void (*prepare)( const struct sp_fragment_shader *shader,
                    struct tgsi_exec_machine *machine,
-                   struct tgsi_sampler *samplers);
+                   struct tgsi_sampler **samplers);
 
    /* Run the shader - this interface will get cleaned up in the
     * future:
@@ -81,7 +82,6 @@ struct sp_fragment_shader {
    void (*delete)( struct sp_fragment_shader * );
 };
 
-struct vertex_info;
 
 /** Subclass of pipe_shader_state */
 struct sp_vertex_shader {
@@ -102,7 +102,7 @@ void softpipe_delete_blend_state(struct pipe_context *,
 void *
 softpipe_create_sampler_state(struct pipe_context *,
                               const struct pipe_sampler_state *);
-void softpipe_bind_sampler_state(struct pipe_context *, unsigned, void *);
+void softpipe_bind_sampler_states(struct pipe_context *, unsigned, void **);
 void softpipe_delete_sampler_state(struct pipe_context *, void *);
 
 void *
@@ -145,20 +145,20 @@ void softpipe_set_polygon_stipple( struct pipe_context *,
 void softpipe_set_scissor_state( struct pipe_context *,
                                  const struct pipe_scissor_state * );
 
-void softpipe_set_sampler_texture( struct pipe_context *,
-                                 unsigned unit,
-                                 struct pipe_texture * );
+void softpipe_set_sampler_textures( struct pipe_context *,
+                                    unsigned num,
+                                    struct pipe_texture ** );
 
 void softpipe_set_viewport_state( struct pipe_context *,
                                   const struct pipe_viewport_state * );
 
-void softpipe_set_vertex_element(struct pipe_context *,
-                                 unsigned index,
-                                 const struct pipe_vertex_element *);
+void softpipe_set_vertex_elements(struct pipe_context *,
+                                  unsigned count,
+                                  const struct pipe_vertex_element *);
 
-void softpipe_set_vertex_buffer(struct pipe_context *,
-                                unsigned index,
-                                const struct pipe_vertex_buffer *);
+void softpipe_set_vertex_buffers(struct pipe_context *,
+                                 unsigned count,
+                                 const struct pipe_vertex_buffer *);
 
 
 void softpipe_update_derived( struct softpipe_context *softpipe );
@@ -171,13 +171,23 @@ boolean softpipe_draw_elements(struct pipe_context *pipe,
                               struct pipe_buffer *indexBuffer,
                               unsigned indexSize,
                               unsigned mode, unsigned start, unsigned count);
+boolean
+softpipe_draw_range_elements(struct pipe_context *pipe,
+                             struct pipe_buffer *indexBuffer,
+                             unsigned indexSize,
+                             unsigned min_index,
+                             unsigned max_index,
+                             unsigned mode, unsigned start, unsigned count);
+
+void
+softpipe_set_edgeflags(struct pipe_context *pipe, const unsigned *edgeflags);
 
 
 void
-softpipe_map_surfaces(struct softpipe_context *sp);
+softpipe_map_transfers(struct softpipe_context *sp);
 
 void
-softpipe_unmap_surfaces(struct softpipe_context *sp);
+softpipe_unmap_transfers(struct softpipe_context *sp);
 
 void
 softpipe_map_texture_surfaces(struct softpipe_context *sp);