summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_rast.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast.h')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast.h85
1 files changed, 49 insertions, 36 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast.h b/src/gallium/drivers/llvmpipe/lp_rast.h
index 80ca68f5a2..eaf2a6f334 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.h
+++ b/src/gallium/drivers/llvmpipe/lp_rast.h
@@ -84,8 +84,7 @@ struct lp_rast_shader_inputs {
float (*dadx)[4];
float (*dady)[4];
- /* edge/step info for 3 edges and 4x4 block of pixels */
- PIPE_ALIGN_VAR(16) int step[3][16];
+ const struct lp_rast_state *state;
};
struct lp_rast_clearzs {
@@ -93,6 +92,22 @@ struct lp_rast_clearzs {
unsigned clearzs_mask;
};
+struct lp_rast_plane {
+ /* one-pixel sized trivial accept offsets for each plane */
+ int ei;
+
+ /* one-pixel sized trivial reject offsets for each plane */
+ int eo;
+
+ /* edge function values at minx,miny ?? */
+ int c;
+
+ int dcdx;
+ int dcdy;
+
+ /* edge/step info for 3 edges and 4x4 block of pixels */
+ const int *step;
+};
/**
* Rasterization information for a triangle known to be in this bin,
@@ -101,35 +116,16 @@ struct lp_rast_clearzs {
* Objects of this type are put into the lp_setup_context::data buffer.
*/
struct lp_rast_triangle {
+ /* inputs for the shader */
+ struct lp_rast_shader_inputs inputs;
+
+ int step[3][16];
+
#ifdef DEBUG
float v[3][2];
#endif
- /* one-pixel sized trivial accept offsets for each plane */
- int ei1;
- int ei2;
- int ei3;
-
- /* one-pixel sized trivial reject offsets for each plane */
- int eo1;
- int eo2;
- int eo3;
-
- /* y deltas for vertex pairs (in fixed pt) */
- int dy12;
- int dy23;
- int dy31;
-
- /* x deltas for vertex pairs (in fixed pt) */
- int dx12;
- int dx23;
- int dx31;
-
- /* edge function values at minx,miny ?? */
- int c1, c2, c3;
-
- /* inputs for the shader */
- PIPE_ALIGN_VAR(16) struct lp_rast_shader_inputs inputs;
+ struct lp_rast_plane plane[7]; /* NOTE: may allocate fewer planes */
};
@@ -153,7 +149,10 @@ lp_rast_finish( struct lp_rasterizer *rast );
union lp_rast_cmd_arg {
const struct lp_rast_shader_inputs *shade_tile;
- const struct lp_rast_triangle *triangle;
+ struct {
+ const struct lp_rast_triangle *tri;
+ unsigned plane_mask;
+ } triangle;
const struct lp_rast_state *set_state;
uint8_t clear_color[4];
const struct lp_rast_clearzs *clear_zstencil;
@@ -173,10 +172,12 @@ lp_rast_arg_inputs( const struct lp_rast_shader_inputs *shade_tile )
}
static INLINE union lp_rast_cmd_arg
-lp_rast_arg_triangle( const struct lp_rast_triangle *triangle )
+lp_rast_arg_triangle( const struct lp_rast_triangle *triangle,
+ unsigned plane_mask)
{
union lp_rast_cmd_arg arg;
- arg.triangle = triangle;
+ arg.triangle.tri = triangle;
+ arg.triangle.plane_mask = plane_mask;
return arg;
}
@@ -226,19 +227,31 @@ 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_set_state( struct lp_rasterizer_task *,
- const union lp_rast_cmd_arg );
-
-void lp_rast_triangle( struct lp_rasterizer_task *,
- const union lp_rast_cmd_arg );
+void lp_rast_triangle_1( struct lp_rasterizer_task *,
+ const union lp_rast_cmd_arg );
+void lp_rast_triangle_2( struct lp_rasterizer_task *,
+ const union lp_rast_cmd_arg );
+void lp_rast_triangle_3( struct lp_rasterizer_task *,
+ const union lp_rast_cmd_arg );
+void lp_rast_triangle_4( struct lp_rasterizer_task *,
+ const union lp_rast_cmd_arg );
+void lp_rast_triangle_5( struct lp_rasterizer_task *,
+ const union lp_rast_cmd_arg );
+void lp_rast_triangle_6( struct lp_rasterizer_task *,
+ const union lp_rast_cmd_arg );
+void lp_rast_triangle_7( struct lp_rasterizer_task *,
+ const union lp_rast_cmd_arg );
void lp_rast_shade_tile( struct lp_rasterizer_task *,
const union lp_rast_cmd_arg );
+void lp_rast_shade_tile_opaque( 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 *,
+void lp_rast_store_linear_color( struct lp_rasterizer_task *,
const union lp_rast_cmd_arg );