Commit e0d89b90 authored by coypoop's avatar coypoop Committed by Matt Turner
Browse files

llvmpipe: avoid left-shifting a negative number.


Reviewed-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
Signed-off-by: coypoop's avatarMaya Rashish <coypu@sdf.org>
parent 962aca19
Pipeline #69493 passed with stages
in 40 minutes and 47 seconds
...@@ -724,7 +724,7 @@ try_setup_line( struct lp_setup_context *setup, ...@@ -724,7 +724,7 @@ try_setup_line( struct lp_setup_context *setup,
struct lp_rast_plane *plane_s = &plane[4]; struct lp_rast_plane *plane_s = &plane[4];
if (s_planes[0]) { if (s_planes[0]) {
plane_s->dcdx = -1 << 8; plane_s->dcdx = ~0U << 8;
plane_s->dcdy = 0; plane_s->dcdy = 0;
plane_s->c = (1-scissor->x0) << 8; plane_s->c = (1-scissor->x0) << 8;
plane_s->eo = 1 << 8; plane_s->eo = 1 << 8;
...@@ -746,7 +746,7 @@ try_setup_line( struct lp_setup_context *setup, ...@@ -746,7 +746,7 @@ try_setup_line( struct lp_setup_context *setup,
} }
if (s_planes[3]) { if (s_planes[3]) {
plane_s->dcdx = 0; plane_s->dcdx = 0;
plane_s->dcdy = -1 << 8; plane_s->dcdy = ~0U << 8;
plane_s->c = (scissor->y1+1) << 8; plane_s->c = (scissor->y1+1) << 8;
plane_s->eo = 0; plane_s->eo = 0;
plane_s++; plane_s++;
......
...@@ -491,7 +491,7 @@ try_setup_point( struct lp_setup_context *setup, ...@@ -491,7 +491,7 @@ try_setup_point( struct lp_setup_context *setup,
{ {
struct lp_rast_plane *plane = GET_PLANES(point); struct lp_rast_plane *plane = GET_PLANES(point);
plane[0].dcdx = -1 << 8; plane[0].dcdx = ~0U << 8;
plane[0].dcdy = 0; plane[0].dcdy = 0;
plane[0].c = (1-bbox.x0) << 8; plane[0].c = (1-bbox.x0) << 8;
plane[0].eo = 1 << 8; plane[0].eo = 1 << 8;
...@@ -507,7 +507,7 @@ try_setup_point( struct lp_setup_context *setup, ...@@ -507,7 +507,7 @@ try_setup_point( struct lp_setup_context *setup,
plane[2].eo = 1 << 8; plane[2].eo = 1 << 8;
plane[3].dcdx = 0; plane[3].dcdx = 0;
plane[3].dcdy = -1 << 8; plane[3].dcdy = ~0U << 8;
plane[3].c = (bbox.y1+1) << 8; plane[3].c = (bbox.y1+1) << 8;
plane[3].eo = 0; plane[3].eo = 0;
} }
......
...@@ -687,7 +687,7 @@ do_triangle_ccw(struct lp_setup_context *setup, ...@@ -687,7 +687,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
struct lp_rast_plane *plane_s = &plane[3]; struct lp_rast_plane *plane_s = &plane[3];
if (s_planes[0]) { if (s_planes[0]) {
plane_s->dcdx = -1 << 8; plane_s->dcdx = ~0U << 8;
plane_s->dcdy = 0; plane_s->dcdy = 0;
plane_s->c = (1-scissor->x0) << 8; plane_s->c = (1-scissor->x0) << 8;
plane_s->eo = 1 << 8; plane_s->eo = 1 << 8;
...@@ -709,7 +709,7 @@ do_triangle_ccw(struct lp_setup_context *setup, ...@@ -709,7 +709,7 @@ do_triangle_ccw(struct lp_setup_context *setup,
} }
if (s_planes[3]) { if (s_planes[3]) {
plane_s->dcdx = 0; plane_s->dcdx = 0;
plane_s->dcdy = -1 << 8; plane_s->dcdy = ~0U << 8;
plane_s->c = (scissor->y1+1) << 8; plane_s->c = (scissor->y1+1) << 8;
plane_s->eo = 0; plane_s->eo = 0;
plane_s++; plane_s++;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment