summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2013-10-29 14:11:28 -0600
committerBrian Paul <brianp@vmware.com>2013-10-31 08:21:58 -0600
commit0e2f0baa43b7d06c88168fdbcff3e26b6dd4970b (patch)
tree66f53c28c04fb51194c505f57281c1ec1e3286be
parent83f276ab05778eea2b3ca493d1b43c7b3b0cf35a (diff)
downloadexternal_mesa3d-0e2f0baa43b7d06c88168fdbcff3e26b6dd4970b.zip
external_mesa3d-0e2f0baa43b7d06c88168fdbcff3e26b6dd4970b.tar.gz
external_mesa3d-0e2f0baa43b7d06c88168fdbcff3e26b6dd4970b.tar.bz2
vbo: fix MSVC double->float conversion warnings
-rw-r--r--src/mesa/vbo/vbo_attrib_tmp.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/vbo/vbo_attrib_tmp.h b/src/mesa/vbo/vbo_attrib_tmp.h
index 02c283d..bbc0205 100644
--- a/src/mesa/vbo/vbo_attrib_tmp.h
+++ b/src/mesa/vbo/vbo_attrib_tmp.h
@@ -140,7 +140,7 @@ static inline float conv_i10_to_norm_float(const struct gl_context *ctx, int i10
(ctx->API == API_OPENGL_CORE && ctx->Version >= 42)) {
/* Equation 2.3 above. */
float f = ((float) val.x) / 511.0F;
- return MAX2(f, -1.0);
+ return MAX2(f, -1.0f);
} else {
/* Equation 2.2 above. */
return (2.0F * (float)val.x + 1.0F) * (1.0F / 1023.0F);
@@ -156,7 +156,7 @@ static inline float conv_i2_to_norm_float(const struct gl_context *ctx, int i2)
(ctx->API == API_OPENGL_CORE && ctx->Version >= 42)) {
/* Equation 2.3 above. */
float f = (float) val.x;
- return MAX2(f, -1.0);
+ return MAX2(f, -1.0f);
} else {
/* Equation 2.2 above. */
return (2.0F * (float)val.x + 1.0F) * (1.0F / 3.0F);