From 0ff132e5a633170afaed0aea54d01438c895b8ab Mon Sep 17 00:00:00 2001 From: Keith Whitwell Date: Fri, 8 Oct 2010 17:21:03 +0100 Subject: llvmpipe: add rast_tri_4_16 for small lines and points --- src/gallium/drivers/llvmpipe/lp_setup_tri.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'src/gallium/drivers/llvmpipe/lp_setup_tri.c') diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c index 9f871011d8..8fd034666c 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c @@ -479,15 +479,14 @@ lp_setup_bin_triangle( struct lp_setup_context *setup, { int ix0 = bbox->x0 / TILE_SIZE; int iy0 = bbox->y0 / TILE_SIZE; + int px = bbox->x0 & 63 & ~3; + int py = bbox->y0 & 63 & ~3; + int mask = px | (py << 8); assert(iy0 == bbox->y1 / TILE_SIZE && ix0 == bbox->x1 / TILE_SIZE); if (nr_planes == 3) { - int px = bbox->x0 & 63 & ~3; - int py = bbox->y0 & 63 & ~3; - int mask = px | (py << 8); - if (sz < 4) { /* Triangle is contained in a single 4x4 stamp: @@ -507,6 +506,12 @@ lp_setup_bin_triangle( struct lp_setup_context *setup, lp_rast_arg_triangle(tri, mask) ); } } + else if (nr_planes == 4 && sz < 16) + { + return lp_scene_bin_command( scene, ix0, iy0, + LP_RAST_OP_TRIANGLE_4_16, + lp_rast_arg_triangle(tri, mask) ); + } /* Triangle is contained in a single tile: -- cgit v1.2.3