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;
};
* These pointers point into the bin data buffer.
*/
struct lp_rast_shader_inputs {
+ float facing; /** Positive for front-facing, negative for back-facing */
+
float (*a0)[4];
float (*dadx)[4];
float (*dady)[4];
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,
* plus inputs to run the shader:
* These fields are tile- and bin-independent.
- * Objects of this type are put into the setup_context::data buffer.
+ * Objects of this type are put into the lp_setup_context::data buffer.
*/
struct lp_rast_triangle {
#ifdef DEBUG
struct lp_rasterizer *
-lp_rast_create( void );
+lp_rast_create( unsigned num_threads );
void
lp_rast_destroy( struct lp_rasterizer * );
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;
};
}
+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 )
{
}
-
/**
* Binnable Commands.
* These get put into bins by the setup code and are called when
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 );
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