summaryrefslogtreecommitdiffstats
path: root/src/mesa/swrast_setup
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2015-07-12 23:15:42 -0700
committerMatt Turner <mattst88@gmail.com>2015-07-29 09:34:52 -0700
commita562313f378a056c8d886e418b518063ab077c39 (patch)
tree1d89ad9d8cd183bbcb560262105625b771799ecf /src/mesa/swrast_setup
parent7adc9fa1f1d12683c5855bf5854dec814629093d (diff)
downloadexternal_mesa3d-a562313f378a056c8d886e418b518063ab077c39.zip
external_mesa3d-a562313f378a056c8d886e418b518063ab077c39.tar.gz
external_mesa3d-a562313f378a056c8d886e418b518063ab077c39.tar.bz2
mesa: Avoid double promotion.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Diffstat (limited to 'src/mesa/swrast_setup')
-rw-r--r--src/mesa/swrast_setup/ss_tritmp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/swrast_setup/ss_tritmp.h b/src/mesa/swrast_setup/ss_tritmp.h
index c38c76a..adb77bd 100644
--- a/src/mesa/swrast_setup/ss_tritmp.h
+++ b/src/mesa/swrast_setup/ss_tritmp.h
@@ -58,7 +58,7 @@ static void TAG(triangle)(struct gl_context *ctx, GLuint e0, GLuint e1, GLuint e
if (IND & (SS_TWOSIDE_BIT | SS_UNFILLED_BIT))
{
- facing = (cc < 0.0) ^ ctx->Polygon._FrontBit;
+ facing = (cc < 0.0F) ^ ctx->Polygon._FrontBit;
if (IND & SS_UNFILLED_BIT)
mode = facing ? ctx->Polygon.BackMode : ctx->Polygon.FrontMode;
@@ -138,7 +138,7 @@ static void TAG(triangle)(struct gl_context *ctx, GLuint e0, GLuint e1, GLuint e
* so no MRD value is used here.
*/
offset = ctx->Polygon.OffsetUnits;
- if (cc * cc > 1e-16) {
+ if (cc * cc > 1e-16F) {
const GLfloat ez = z[0] - z[2];
const GLfloat fz = z[1] - z[2];
const GLfloat oneOverArea = 1.0F / cc;