gallium: keep track of num_vertex_attribs/buffers for shorter loops
[mesa.git] / src / gallium / drivers / softpipe / sp_state.h
index ef8cf67d4c3e71829187dc8d17034cb22a1a4567..6e6501f5bc44f61fb9ff534f4ff83b96169c624f 100644 (file)
@@ -32,6 +32,7 @@
 #define SP_STATE_H
 
 #include "pipe/p_state.h"
+#include "tgsi/util/tgsi_scan.h"
 
 
 #define SP_NEW_VIEWPORT      0x1
@@ -52,7 +53,6 @@
 
 
 struct tgsi_sampler;
-struct tgsi_interp_coef;
 struct tgsi_exec_machine;
 
 
@@ -61,16 +61,18 @@ struct tgsi_exec_machine;
  * 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;
+
+   struct tgsi_shader_info info;
 
-   void (*prepare)( struct sp_fragment_shader *shader,
+   void (*prepare)( const struct sp_fragment_shader *shader,
                    struct tgsi_exec_machine *machine,
                    struct tgsi_sampler *samplers);
 
    /* Run the shader - this interface will get cleaned up in the
     * future:
     */
-   unsigned (*run)( struct sp_fragment_shader *shader,
+   unsigned (*run)( const struct sp_fragment_shader *shader,
                    struct tgsi_exec_machine *machine,
                    struct quad_header *quad );
 
@@ -99,7 +101,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 *
@@ -142,20 +144,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 );