[Mesa-dev] [PATCH 02/18] glsl: add 'f' suffix to floats to silence MSVC warnings

Brian Paul brianp at vmware.com
Sun Nov 4 15:43:47 PST 2012


---
 src/glsl/ir.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/glsl/ir.cpp b/src/glsl/ir.cpp
index 1c7aada..7b0a487 100644
--- a/src/glsl/ir.cpp
+++ b/src/glsl/ir.cpp
@@ -780,7 +780,7 @@ ir_constant::get_float_component(unsigned i) const
    case GLSL_TYPE_UINT:  return (float) this->value.u[i];
    case GLSL_TYPE_INT:   return (float) this->value.i[i];
    case GLSL_TYPE_FLOAT: return this->value.f[i];
-   case GLSL_TYPE_BOOL:  return this->value.b[i] ? 1.0 : 0.0;
+   case GLSL_TYPE_BOOL:  return this->value.b[i] ? 1.0f : 0.0f;
    default:              assert(!"Should not get here."); break;
    }
 
-- 
1.7.3.4



More information about the mesa-dev mailing list