diff options
author | Matt Turner <[email protected]> | 2015-07-12 23:15:10 -0700 |
---|---|---|
committer | Matt Turner <[email protected]> | 2015-07-29 09:34:52 -0700 |
commit | 04aa8b58a09e3b415916fa569111c1f76d07a8d5 (patch) | |
tree | 747ef02288043292b257b6e8efa455cec31af5be /src/mesa/swrast/s_points.c | |
parent | c92b2a1d7b286de8641512970a87c94809fbbc3f (diff) |
swrast: Avoid double promotion.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/mesa/swrast/s_points.c')
-rw-r--r-- | src/mesa/swrast/s_points.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/swrast/s_points.c b/src/mesa/swrast/s_points.c index 2212c95fa9a..d9aae73302c 100644 --- a/src/mesa/swrast/s_points.c +++ b/src/mesa/swrast/s_points.c @@ -208,9 +208,9 @@ sprite_point(struct gl_context *ctx, const SWvertex *vert) else { /* even size */ /* 0.501 factor allows conformance to pass */ - xmin = (GLint) (x + 0.501) - iRadius; + xmin = (GLint) (x + 0.501F) - iRadius; xmax = xmin + iSize - 1; - ymin = (GLint) (y + 0.501) - iRadius; + ymin = (GLint) (y + 0.501F) - iRadius; ymax = ymin + iSize - 1; } @@ -423,9 +423,9 @@ large_point(struct gl_context *ctx, const SWvertex *vert) else { /* even size */ /* 0.501 factor allows conformance to pass */ - xmin = (GLint) (x + 0.501) - iRadius; + xmin = (GLint) (x + 0.501F) - iRadius; xmax = xmin + iSize - 1; - ymin = (GLint) (y + 0.501) - iRadius; + ymin = (GLint) (y + 0.501F) - iRadius; ymax = ymin + iSize - 1; } @@ -552,7 +552,7 @@ _swrast_choose_point(struct gl_context *ctx) else if (ctx->Point.SmoothFlag) { swrast->Point = smooth_point; } - else if (size > 1.0 || + else if (size > 1.0F || ctx->Point._Attenuated || ctx->VertexProgram.PointSizeEnabled) { swrast->Point = large_point; |