summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_rast_tri.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-08-15 16:21:46 +0100
committerKeith Whitwell <keithw@vmware.com>2010-08-15 16:25:06 +0100
commit510b03539413552a543e25de6b896eb10baf60ae (patch)
treeb5e38181ef9c7133775a29c17bc41a09c6ac1b3d /src/gallium/drivers/llvmpipe/lp_rast_tri.c
parent2d53dc873ea1d9e0e3e4c1cf08a63621661e422f (diff)
llvmpipe: reorganize block4 loop, nice speedup
isosurf 95->115 fps just by exchanging the two inner loops in this function...
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast_tri.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast_tri.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_tri.c b/src/gallium/drivers/llvmpipe/lp_rast_tri.c
index ebe9a8e92b..c1f2680ddc 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast_tri.c
@@ -113,6 +113,21 @@ block_full_16(struct lp_rasterizer_task *task,
block_full_4(task, tri, x + ix, y + iy);
}
+
+static INLINE unsigned
+build_mask(int c, const int *step)
+{
+ int mask = 0;
+ int i;
+
+ for (i = 0; i < 16; i++) {
+ mask |= ((c + step[i]) >> 31) & (1 << i);
+ }
+
+ return mask;
+}
+
+
#define TAG(x) x##_1
#define NR_PLANES 1
#include "lp_rast_tri_tmp.h"