summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMaya Rashish <[email protected]>2019-09-03 13:04:15 +0300
committerMatt Turner <[email protected]>2019-10-09 20:20:40 +0000
commite0d89b90d430e44e08210937558ccbc7701da4ae (patch)
tree6a3c7417210a5cfda87189701eafa0cd7c347fd1 /src/gallium
parent962aca19105dc9b443a62b460b114c1b5f995164 (diff)
llvmpipe: avoid left-shifting a negative number.
Reviewed-by: Matt Turner <[email protected]> Signed-off-by: Maya Rashish <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_line.c4
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_point.c4
-rw-r--r--src/gallium/drivers/llvmpipe/lp_setup_tri.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_line.c b/src/gallium/drivers/llvmpipe/lp_setup_line.c
index c1d8237a8ac..5e26b1e9ffc 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_line.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_line.c
@@ -724,7 +724,7 @@ try_setup_line( struct lp_setup_context *setup,
struct lp_rast_plane *plane_s = &plane[4];
if (s_planes[0]) {
- plane_s->dcdx = -1 << 8;
+ plane_s->dcdx = ~0U << 8;
plane_s->dcdy = 0;
plane_s->c = (1-scissor->x0) << 8;
plane_s->eo = 1 << 8;
@@ -746,7 +746,7 @@ try_setup_line( struct lp_setup_context *setup,
}
if (s_planes[3]) {
plane_s->dcdx = 0;
- plane_s->dcdy = -1 << 8;
+ plane_s->dcdy = ~0U << 8;
plane_s->c = (scissor->y1+1) << 8;
plane_s->eo = 0;
plane_s++;
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_point.c b/src/gallium/drivers/llvmpipe/lp_setup_point.c
index fc1d5ef6e36..0c4b1b758f9 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_point.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_point.c
@@ -491,7 +491,7 @@ try_setup_point( struct lp_setup_context *setup,
{
struct lp_rast_plane *plane = GET_PLANES(point);
- plane[0].dcdx = -1 << 8;
+ plane[0].dcdx = ~0U << 8;
plane[0].dcdy = 0;
plane[0].c = (1-bbox.x0) << 8;
plane[0].eo = 1 << 8;
@@ -507,7 +507,7 @@ try_setup_point( struct lp_setup_context *setup,
plane[2].eo = 1 << 8;
plane[3].dcdx = 0;
- plane[3].dcdy = -1 << 8;
+ plane[3].dcdy = ~0U << 8;
plane[3].c = (bbox.y1+1) << 8;
plane[3].eo = 0;
}
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_tri.c b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
index 1852ec05d56..0fa3443d519 100644
--- a/src/gallium/drivers/llvmpipe/lp_setup_tri.c
+++ b/src/gallium/drivers/llvmpipe/lp_setup_tri.c
@@ -687,7 +687,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
struct lp_rast_plane *plane_s = &plane[3];
if (s_planes[0]) {
- plane_s->dcdx = -1 << 8;
+ plane_s->dcdx = ~0U << 8;
plane_s->dcdy = 0;
plane_s->c = (1-scissor->x0) << 8;
plane_s->eo = 1 << 8;
@@ -709,7 +709,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
}
if (s_planes[3]) {
plane_s->dcdx = 0;
- plane_s->dcdy = -1 << 8;
+ plane_s->dcdy = ~0U << 8;
plane_s->c = (scissor->y1+1) << 8;
plane_s->eo = 0;
plane_s++;