diff options
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_setup_line.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_setup_line.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_setup_line.c b/src/gallium/drivers/llvmpipe/lp_setup_line.c index 3a7212326e3..1357d026dfe 100644 --- a/src/gallium/drivers/llvmpipe/lp_setup_line.c +++ b/src/gallium/drivers/llvmpipe/lp_setup_line.c @@ -361,10 +361,10 @@ try_setup_line( struct lp_setup_context *setup, if (fabsf(dx) >= fabsf(dy)) { float dydx = dy / dx; - x1diff = v1[0][0] - (float) floor(v1[0][0]) - 0.5; - y1diff = v1[0][1] - (float) floor(v1[0][1]) - 0.5; - x2diff = v2[0][0] - (float) floor(v2[0][0]) - 0.5; - y2diff = v2[0][1] - (float) floor(v2[0][1]) - 0.5; + x1diff = v1[0][0] - floorf(v1[0][0]) - 0.5f; + y1diff = v1[0][1] - floorf(v1[0][1]) - 0.5f; + x2diff = v2[0][0] - floorf(v2[0][0]) - 0.5f; + y2diff = v2[0][1] - floorf(v2[0][1]) - 0.5f; if (y2diff==-0.5 && dy<0){ y2diff = 0.5; @@ -459,10 +459,10 @@ try_setup_line( struct lp_setup_context *setup, const float dxdy = dx / dy; /* Y-MAJOR LINE */ - x1diff = v1[0][0] - (float) floor(v1[0][0]) - 0.5; - y1diff = v1[0][1] - (float) floor(v1[0][1]) - 0.5; - x2diff = v2[0][0] - (float) floor(v2[0][0]) - 0.5; - y2diff = v2[0][1] - (float) floor(v2[0][1]) - 0.5; + x1diff = v1[0][0] - floorf(v1[0][0]) - 0.5f; + y1diff = v1[0][1] - floorf(v1[0][1]) - 0.5f; + x2diff = v2[0][0] - floorf(v2[0][0]) - 0.5f; + y2diff = v2[0][1] - floorf(v2[0][1]) - 0.5f; if (x2diff==-0.5 && dx<0) { x2diff = 0.5; |