diff options
author | Brian Paul <[email protected]> | 2010-01-27 17:00:32 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2010-01-27 17:04:30 -0700 |
commit | 880411c72aee7c0ec81366bdf6ab8cf25bebb9d5 (patch) | |
tree | d5ad4af21a0e59bfee2ea3bec9b58ca9db130fd9 /src/mesa/swrast/s_atifragshader.c | |
parent | 4e5364d6fcd63b6f927ac4fb76effec0007d6797 (diff) |
swrast: silence double->float assignment warnings
Reported by Karl Schultz.
Diffstat (limited to 'src/mesa/swrast/s_atifragshader.c')
-rw-r--r-- | src/mesa/swrast/s_atifragshader.c | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/src/mesa/swrast/s_atifragshader.c b/src/mesa/swrast/s_atifragshader.c index 353e9999d61..05da64de3ac 100644 --- a/src/mesa/swrast/s_atifragshader.c +++ b/src/mesa/swrast/s_atifragshader.c @@ -82,10 +82,11 @@ apply_swizzle(GLfloat values[4], GLuint swizzle) break; case GL_SWIZZLE_STQ_DQ_ATI: /* make sure q is not 0 to avoid problems later with infinite values (texture lookup)? */ - if (q == 0.0F) q = 0.000000001; + if (q == 0.0F) + q = 0.000000001F; values[0] = s / q; values[1] = t / q; - values[2] = 1 / q; + values[2] = 1.0 / q; break; } values[3] = 0.0; @@ -171,27 +172,27 @@ apply_dst_mod(GLuint optype, GLuint mod, GLfloat * val) val[i] = 8 * val[i]; break; case GL_HALF_BIT_ATI: - val[i] = val[i] * 0.5; + val[i] = val[i] * 0.5F; break; case GL_QUARTER_BIT_ATI: - val[i] = val[i] * 0.25; + val[i] = val[i] * 0.25F; break; case GL_EIGHTH_BIT_ATI: - val[i] = val[i] * 0.125; + val[i] = val[i] * 0.125F; break; } if (has_sat) { - if (val[i] < 0.0) - val[i] = 0; - else if (val[i] > 1.0) - val[i] = 1.0; + if (val[i] < 0.0F) + val[i] = 0.0F; + else if (val[i] > 1.0F) + val[i] = 1.0F; } else { - if (val[i] < -8.0) - val[i] = -8.0; - else if (val[i] > 8.0) - val[i] = 8.0; + if (val[i] < -8.0F) + val[i] = -8.0F; + else if (val[i] > 8.0F) + val[i] = 8.0F; } } } |