summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast/s_span.c
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2015-07-12 23:15:10 -0700
committerMatt Turner <[email protected]>2015-07-29 09:34:52 -0700
commit04aa8b58a09e3b415916fa569111c1f76d07a8d5 (patch)
tree747ef02288043292b257b6e8efa455cec31af5be /src/mesa/swrast/s_span.c
parentc92b2a1d7b286de8641512970a87c94809fbbc3f (diff)
swrast: Avoid double promotion.
Reviewed-by: Iago Toral Quiroga <[email protected]>
Diffstat (limited to 'src/mesa/swrast/s_span.c')
-rw-r--r--src/mesa/swrast/s_span.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mesa/swrast/s_span.c b/src/mesa/swrast/s_span.c
index 3db10e163d7..cd939ba9510 100644
--- a/src/mesa/swrast/s_span.c
+++ b/src/mesa/swrast/s_span.c
@@ -506,7 +506,7 @@ interpolate_texcoords(struct gl_context *ctx, SWspan *span)
/* LOD is calculated directly in the ansiotropic filter, we can
* skip the normal lambda function as the result is ignored.
*/
- if (samp->MaxAnisotropy > 1.0 &&
+ if (samp->MaxAnisotropy > 1.0F &&
samp->MinFilter == GL_LINEAR_MIPMAP_LINEAR) {
needLambda = GL_FALSE;
}
@@ -886,16 +886,16 @@ apply_aa_coverage(SWspan *span)
GLubyte (*rgba)[4] = span->array->rgba8;
for (i = 0; i < span->end; i++) {
const GLfloat a = rgba[i][ACOMP] * coverage[i];
- rgba[i][ACOMP] = (GLubyte) CLAMP(a, 0.0, 255.0);
- assert(coverage[i] >= 0.0);
- assert(coverage[i] <= 1.0);
+ rgba[i][ACOMP] = (GLubyte) CLAMP(a, 0.0F, 255.0F);
+ assert(coverage[i] >= 0.0F);
+ assert(coverage[i] <= 1.0F);
}
}
else if (span->array->ChanType == GL_UNSIGNED_SHORT) {
GLushort (*rgba)[4] = span->array->rgba16;
for (i = 0; i < span->end; i++) {
const GLfloat a = rgba[i][ACOMP] * coverage[i];
- rgba[i][ACOMP] = (GLushort) CLAMP(a, 0.0, 65535.0);
+ rgba[i][ACOMP] = (GLushort) CLAMP(a, 0.0F, 65535.0F);
}
}
else {