Mesa (lp-binning): llvmpipe: replace INT_MIN/2 with INT_MIN

Brian Paul brianp at kemper.freedesktop.org
Thu Dec 17 08:01:54 PST 2009


Module: Mesa
Branch: lp-binning
Commit: 808170a0ff6c3a51a1b69a54ed8045b2e0f7d0d1
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=808170a0ff6c3a51a1b69a54ed8045b2e0f7d0d1

Author: Brian Paul <brianp at vmware.com>
Date:   Thu Dec 17 09:00:58 2009 -0700

llvmpipe: replace INT_MIN/2 with INT_MIN

Since changing the in/out test we can just use INT_MIN to be sure the
comparison against the step values always passes.

---

 src/gallium/drivers/llvmpipe/lp_rast.c     |    2 +-
 src/gallium/drivers/llvmpipe/lp_rast_tri.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/llvmpipe/lp_rast.c b/src/gallium/drivers/llvmpipe/lp_rast.c
index 015865a..24393c8 100644
--- a/src/gallium/drivers/llvmpipe/lp_rast.c
+++ b/src/gallium/drivers/llvmpipe/lp_rast.c
@@ -281,7 +281,7 @@ void lp_rast_shade_tile( struct lp_rasterizer *rast,
                          const union lp_rast_cmd_arg arg )
 {
    /* Set c1,c2,c3 to large values so the in/out test always passes */
-   const int32_t c1 = INT_MIN/2, c2 = INT_MIN/2, c3 = INT_MIN/2;
+   const int32_t c1 = INT_MIN, c2 = INT_MIN, c3 = INT_MIN;
    const struct lp_rast_shader_inputs *inputs = arg.shade_tile;
    const unsigned tile_x = rast->tasks[thread_index].x;
    const unsigned tile_y = rast->tasks[thread_index].y;
diff --git a/src/gallium/drivers/llvmpipe/lp_rast_tri.c b/src/gallium/drivers/llvmpipe/lp_rast_tri.c
index d6e8d6d..bc7397f 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_MIN/2, c2 = INT_MIN/2, c3 = INT_MIN/2;
+   const int32_t c1 = INT_MIN, c2 = INT_MIN, c3 = INT_MIN;
    lp_rast_shade_quads(rast_task->rast,
                        rast_task->thread_index,
                        &tri->inputs, 



More information about the mesa-commit mailing list