Merge branch 'lp-offset-twoside'
[mesa.git] / src / gallium / auxiliary / draw / draw_vs.h
index 89ae158751a931edc5b3c49ed50ebf0dcb3d0b38..f9a038788fba9856b94a6ff32c0a427d83a958f3 100644 (file)
@@ -43,6 +43,7 @@ struct draw_varient_input
    enum pipe_format format;
    unsigned buffer;
    unsigned offset; 
+   unsigned instance_divisor;
 };
 
 struct draw_varient_output
@@ -79,7 +80,8 @@ struct draw_vs_varient {
    void (*set_buffer)( struct draw_vs_varient *,
                       unsigned i,
                       const void *ptr,
-                      unsigned stride );
+                      unsigned stride,
+                      unsigned max_stride );
 
    void (PIPE_CDECL *run_linear)( struct draw_vs_varient *shader,
                                   unsigned start,
@@ -107,6 +109,7 @@ struct draw_vertex_shader {
 
    struct tgsi_shader_info info;
    unsigned position_output;
+   unsigned edgeflag_output;
 
    /* Extracted from shader:
     */
@@ -130,7 +133,8 @@ struct draw_vertex_shader {
    void (*run_linear)( struct draw_vertex_shader *shader,
                       const float (*input)[4],
                       float (*output)[4],
-                      const float (*constants)[4],
+                       const void *constants[PIPE_MAX_CONSTANT_BUFFERS],
+                       const unsigned const_size[PIPE_MAX_CONSTANT_BUFFERS],
                       unsigned count,
                       unsigned input_stride,
                       unsigned output_stride );
@@ -161,18 +165,19 @@ struct draw_vertex_shader *
 draw_create_vs_ppc(struct draw_context *draw,
                   const struct pipe_shader_state *templ);
 
-struct draw_vertex_shader *
-draw_create_vs_llvm(struct draw_context *draw,
-                   const struct pipe_shader_state *templ);
-
-
 
 struct draw_vs_varient_key;
 struct draw_vertex_shader;
 
-struct draw_vs_varient *draw_vs_varient_aos_sse( struct draw_vertex_shader *vs,
-                                                 const struct draw_vs_varient_key *key );
+struct draw_vs_varient *
+draw_vs_create_varient_aos_sse( struct draw_vertex_shader *vs,
+                                const struct draw_vs_varient_key *key );
 
+#if HAVE_LLVM
+struct draw_vertex_shader *
+draw_create_vs_llvm(struct draw_context *draw,
+                   const struct pipe_shader_state *state);
+#endif
 
 
 /********************************************************************************
@@ -189,8 +194,9 @@ struct translate *draw_vs_get_fetch( struct draw_context *draw,
 struct translate *draw_vs_get_emit( struct draw_context *draw,
                                     struct translate_key *key );
 
-struct draw_vs_varient *draw_vs_varient_generic( struct draw_vertex_shader *vs,
-                                                 const struct draw_vs_varient_key *key );
+struct draw_vs_varient *
+draw_vs_create_varient_generic( struct draw_vertex_shader *vs,
+                                const struct draw_vs_varient_key *key );
 
 
 
@@ -210,8 +216,10 @@ static INLINE int draw_vs_varient_key_compare( const struct draw_vs_varient_key
 struct aos_machine *draw_vs_aos_machine( void );
 void draw_vs_aos_machine_destroy( struct aos_machine *machine );
 
-void draw_vs_aos_machine_constants( struct aos_machine *machine,
-                                    const float (*constants)[4] );
+void
+draw_vs_aos_machine_constants(struct aos_machine *machine,
+                              unsigned slot,
+                              const void *constants);
 
 void draw_vs_aos_machine_viewport( struct aos_machine *machine,
                                    const struct pipe_viewport_state *viewport );