summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/llvmpipe/lp_rast_tri.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2009-12-16 17:08:13 -0700
committerBrian Paul <brianp@vmware.com>2009-12-17 08:17:04 -0700
commitb9d33db0a4cb818154b713a27834f66025b14672 (patch)
treedba2f1ad9f604f920527302211b6482ce869abbb /src/gallium/drivers/llvmpipe/lp_rast_tri.c
parent7f2ba80025e4b534db72427a206e6a542fc2f520 (diff)
llvmpipe: improve the in/out test a little
Instead of: s = c + step m = s > 0 Do: m = step > c (with negated c)
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_rast_tri.c')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_rast_tri.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_tri.c b/src/gallium/drivers/llvmpipe/lp_rast_tri.c
index 9b1861223a..d6e8d6d5ab 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast_tri.c
@@ -90,7 +90,7 @@ block_full_4( struct lp_rasterizer_task *rast_task,
int x, int y )
{
/* Set c1,c2,c3 to large values so the in/out test always passes */
- const int32_t c1 = INT_MAX/2, c2 = INT_MAX/2, c3 = INT_MAX/2;
+ const int32_t c1 = INT_MIN/2, c2 = INT_MIN/2, c3 = INT_MIN/2;
lp_rast_shade_quads(rast_task->rast,
rast_task->thread_index,
&tri->inputs,
@@ -133,7 +133,7 @@ do_block_4( struct lp_rasterizer_task *rast_task,
rast_task->thread_index,
&tri->inputs,
x, y,
- c1, c2, c3);
+ -c1, -c2, -c3);
}