Merge branch 'gallium-newclear'
[mesa.git] / src / gallium / drivers / llvmpipe / lp_rast.h
index ae838f3fbef6ca70d9a6befd038792b67cb83c64..80ca68f5a2f5161cfe38d676fbf7d75900c5efd1 100644 (file)
@@ -66,13 +66,9 @@ struct lp_rast_state {
    struct lp_jit_context jit_context;
    
    /* The shader itself.  Probably we also need to pass a pointer to
-    * the tile color/z/stencil data somehow:
-    * jit_function[0] skips the triangle in/out test code
-    * jit_function[1] does triangle in/out testing
+    * the tile color/z/stencil data somehow
      */
-   lp_jit_frag_func jit_function[2];
-
-   boolean opaque;
+   struct lp_fragment_shader_variant *variant;
 };
 
 
@@ -92,6 +88,11 @@ struct lp_rast_shader_inputs {
    PIPE_ALIGN_VAR(16) int step[3][16];
 };
 
+struct lp_rast_clearzs {
+   unsigned clearzs_value;
+   unsigned clearzs_mask;
+};
+
 
 /**
  * Rasterization information for a triangle known to be in this bin,
@@ -134,7 +135,7 @@ struct lp_rast_triangle {
 
 
 struct lp_rasterizer *
-lp_rast_create( void );
+lp_rast_create( unsigned num_threads );
 
 void
 lp_rast_destroy( struct lp_rasterizer * );
@@ -155,8 +156,9 @@ union lp_rast_cmd_arg {
    const struct lp_rast_triangle *triangle;
    const struct lp_rast_state *set_state;
    uint8_t clear_color[4];
-   unsigned clear_zstencil;
+   const struct lp_rast_clearzs *clear_zstencil;
    struct lp_fence *fence;
+   struct llvmpipe_query *query_obj;
 };
 
 
@@ -195,6 +197,14 @@ lp_rast_arg_fence( struct lp_fence *fence )
 }
 
 
+static INLINE union lp_rast_cmd_arg
+lp_rast_arg_clearzs( const struct lp_rast_clearzs *clearzs )
+{
+   union lp_rast_cmd_arg arg;
+   arg.clear_zstencil = clearzs;
+   return arg;
+}
+
 static INLINE union lp_rast_cmd_arg
 lp_rast_arg_null( void )
 {
@@ -204,7 +214,6 @@ lp_rast_arg_null( void )
 }
 
 
-
 /**
  * Binnable Commands.
  * These get put into bins by the setup code and are called when
@@ -217,9 +226,6 @@ void lp_rast_clear_color( struct lp_rasterizer_task *,
 void lp_rast_clear_zstencil( struct lp_rasterizer_task *, 
                              const union lp_rast_cmd_arg );
 
-void lp_rast_load_color( struct lp_rasterizer_task *, 
-                         const union lp_rast_cmd_arg );
-
 void lp_rast_set_state( struct lp_rasterizer_task *, 
                         const union lp_rast_cmd_arg );
 
@@ -232,4 +238,15 @@ void lp_rast_shade_tile( struct lp_rasterizer_task *,
 void lp_rast_fence( struct lp_rasterizer_task *,
                     const union lp_rast_cmd_arg );
 
+void lp_rast_store_color( struct lp_rasterizer_task *,
+                          const union lp_rast_cmd_arg );
+
+
+void lp_rast_begin_query(struct lp_rasterizer_task *,
+                         const union lp_rast_cmd_arg );
+
+void lp_rast_end_query(struct lp_rasterizer_task *,
+                       const union lp_rast_cmd_arg );
+
+
 #endif