diff options
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_tri.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup_tri.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index b8f79849e8..80617120b1 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -178,6 +178,7 @@ static void setup_tri_coefficients( struct setup_context *setup, const float (*v3)[4], boolean frontface) { + struct lp_bins *bins = lp_setup_get_current_bins(setup); unsigned slot; /* Allocate space for the a0, dadx and dady arrays @@ -185,9 +186,9 @@ static void setup_tri_coefficients( struct setup_context *setup, { unsigned bytes; bytes = (setup->fs.nr_inputs + 1) * 4 * sizeof(float); - tri->inputs.a0 = lp_bin_alloc_aligned( &setup->bins, bytes, 16 ); - tri->inputs.dadx = lp_bin_alloc_aligned( &setup->bins, bytes, 16 ); - tri->inputs.dady = lp_bin_alloc_aligned( &setup->bins, bytes, 16 ); + tri->inputs.a0 = lp_bin_alloc_aligned( bins, bytes, 16 ); + tri->inputs.dadx = lp_bin_alloc_aligned( bins, bytes, 16 ); + tri->inputs.dady = lp_bin_alloc_aligned( bins, bytes, 16 ); } /* The internal position input is in slot zero: @@ -263,7 +264,8 @@ do_triangle_ccw(struct setup_context *setup, const int y2 = subpixel_snap(v2[0][1]); const int y3 = subpixel_snap(v3[0][1]); - struct lp_rast_triangle *tri = lp_bin_alloc( &setup->bins, sizeof *tri ); + struct lp_bins *bins = lp_setup_get_current_bins(setup); + struct lp_rast_triangle *tri = lp_bin_alloc( bins, sizeof *tri ); float area, oneoverarea; int minx, maxx, miny, maxy; @@ -283,7 +285,7 @@ do_triangle_ccw(struct setup_context *setup, * XXX: subject to overflow?? */ if (area <= 0) { - lp_bin_putback_data( &setup->bins, sizeof *tri ); + lp_bin_putback_data( bins, sizeof *tri ); return; } @@ -295,7 +297,7 @@ do_triangle_ccw(struct setup_context *setup, if (tri->miny == tri->maxy || tri->minx == tri->maxx) { - lp_bin_putback_data( &setup->bins, sizeof *tri ); + lp_bin_putback_data( bins, sizeof *tri ); return; } @@ -405,7 +407,7 @@ do_triangle_ccw(struct setup_context *setup, { /* Triangle is contained in a single tile: */ - lp_bin_command( &setup->bins, minx, miny, lp_rast_triangle, + lp_bin_command( bins, minx, miny, lp_rast_triangle, lp_rast_arg_triangle(tri) ); } else @@ -464,7 +466,7 @@ do_triangle_ccw(struct setup_context *setup, { in = 1; /* triangle covers the whole tile- shade whole tile */ - lp_bin_command( &setup->bins, x, y, + lp_bin_command( bins, x, y, lp_rast_shade_tile, lp_rast_arg_inputs(&tri->inputs) ); } @@ -472,7 +474,7 @@ do_triangle_ccw(struct setup_context *setup, { in = 1; /* shade partial tile */ - lp_bin_command( &setup->bins, x, y, + lp_bin_command( bins, x, y, lp_rast_triangle, lp_rast_arg_triangle(tri) ); } |