summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_setup_tri.c
diff options
context:
space:
mode:
authorKeith Whitwell <keithw@vmware.com>2010-09-24 11:18:38 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-09-25 12:22:09 +0100
commit72258387786332c49b3275b8136a99be7591bf7f (patch)
tree81960b91422e696d92963eb83e092dbf40ea396e /src/gallium/drivers/llvmpipe/lp_setup_tri.c
parent60a45b03c389f708c513bb2b70c5973175f01068 (diff)
llvmpipe: handle up to 8 planes in triangle binner
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_tri.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_tri.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index 5090f82ab5..9016bb8e24 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -160,8 +160,9 @@ lp_setup_print_triangle(struct lp_setup_context *setup,
}
+#define MAX_PLANES 8
static unsigned
-lp_rast_tri_tab[9] = {
+lp_rast_tri_tab[MAX_PLANES+1] = {
0, /* should be impossible */
LP_RAST_OP_TRIANGLE_1,
LP_RAST_OP_TRIANGLE_2,
@@ -531,11 +532,11 @@ lp_setup_bin_triangle( struct lp_setup_context *setup,
}
else
{
- int c[7];
- int ei[7];
- int eo[7];
- int xstep[7];
- int ystep[7];
+ int c[MAX_PLANES];
+ int ei[MAX_PLANES];
+ int eo[MAX_PLANES];
+ int xstep[MAX_PLANES];
+ int ystep[MAX_PLANES];
int x, y;
int ix0 = bbox->x0 / TILE_SIZE;
@@ -564,7 +565,7 @@ lp_setup_bin_triangle( struct lp_setup_context *setup,
for (y = iy0; y <= iy1; y++)
{
boolean in = FALSE; /* are we inside the triangle? */
- int cx[7];
+ int cx[MAX_PLANES];
for (i = 0; i < nr_planes; i++)
cx[i] = c[i];