summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_setup_tri.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-10-08 17:21:03 +0100
committerKeith Whitwell <keithw@vmware.com>2010-10-08 17:30:08 +0100
commit0ff132e5a633170afaed0aea54d01438c895b8ab (patch)
treecbef2ed85c77611a5daf3ba4317206a29d4a415d /src/gallium/drivers/llvmpipe/lp_setup_tri.c
parenteeb13e2352d7a44881b011cb3232bb80aee0c826 (diff)
llvmpipe: add rast_tri_4_16 for small lines and points
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_tri.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_tri.c13
1 files changed, 9 insertions, 4 deletions
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: