llvmpipe: hook up some state, add stub line and point functions
[mesa.git] / src / gallium / drivers / llvmpipe / lp_rast.h
index 0aa111b4723b971b7677634df827b4220bc64c10..aa50fba5a604f02bdd780c58b58eca4f191ea31a 100644 (file)
@@ -61,11 +61,15 @@ struct lp_rast_shader_inputs {
     */
    const struct lp_rast_state *state;
 
-   /* Attribute interpolation:  FIXME: reduce memory waste!
+   /* Attribute interpolation:
+    *
+    * First coefficient is position.
+    *
+    * FIXME: reduce memory waste!
     */
-   float a0[PIPE_MAX_ATTRIBS][4];
-   float dadx[PIPE_MAX_ATTRIBS][4];
-   float dady[PIPE_MAX_ATTRIBS][4];
+   float a0[1 + PIPE_MAX_SHADER_INPUTS][4];
+   float dadx[1 + PIPE_MAX_SHADER_INPUTS][4];
+   float dady[1 + PIPE_MAX_SHADER_INPUTS][4];
 };
 
 
@@ -92,29 +96,31 @@ struct lp_rast_triangle {
    float dx12;
    float dx23;
    float dx31;
-};
 
-struct clear_tile {
-   boolean do_color;
-   boolean do_depth_stencil;
-   unsigned rgba;
-   unsigned depth_stencil;
-};
+   /* XXX: these are only used inside lp_setup_tri.c, don't really
+    * need to bin them:
+    */
+   float oneoverarea;
 
-struct load_tile {
-   boolean do_color;
-   boolean do_depth_stencil;
+   /* inputs for the shader */
+   struct lp_rast_shader_inputs inputs;
 };
 
 
+
 struct lp_rasterizer *lp_rast_create( void );
 
-void lp_rast_bind_surfaces( struct lp_rasterizer *,
-                           struct pipe_surface *cbuf,
-                           struct pipe_surface *zsbuf,
-                           const float *clear_color,
-                           double clear_depth,
-                           unsigned clear_stencil);
+void lp_rast_begin( struct lp_rasterizer *,
+                    unsigned width,
+                    unsigned height);
+
+void lp_rast_bind_color( struct lp_rasterizer *,
+                         struct pipe_surface *cbuf,
+                         boolean write_when_done );
+
+void lp_rast_bind_zstencil( struct lp_rasterizer *,
+                            struct pipe_surface *zsbuf,
+                            boolean write_when_done );
 
 /* Begining of each tile:
  */
@@ -157,18 +163,11 @@ void lp_rast_shade_tile( struct lp_rasterizer *,
                          const union lp_rast_cmd_arg *,
                          const struct lp_rast_shader_inputs *);
 
-void lp_rast_store_color( struct lp_rasterizer *,
-                          const union lp_rast_cmd_arg *);
-
-void lp_rast_store_zstencil( struct lp_rasterizer *,
-                             const union lp_rast_cmd_arg *);
-
 
 /* End of tile:
  */
 
-void lp_rast_end_tile( struct lp_rasterizer *rast,
-                       boolean write_depth );
+void lp_rast_end_tile( struct lp_rasterizer *rast );
 
 /* Shutdown:
  */