GLSL's roundEven() doesn't return an int and this fixes an MSVC
warning where the returned value is being assigned to a float.
---
 src/glsl/ir_constant_expression.cpp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/glsl/ir_constant_expression.cpp 
b/src/glsl/ir_constant_expression.cpp
index 17b54b9..8d8d048 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -46,7 +46,7 @@
  * purposes.  Mesa's IROUND macro is close to what we want, but it
  * rounds away from 0 on n + 0.5.
  */
-static int
+static float
 round_to_even(float val)
 {
    int rounded = IROUND(val);
@@ -56,7 +56,7 @@ round_to_even(float val)
         rounded += val > 0 ? -1 : 1;
    }
 
-   return rounded;
+   return (float) rounded;
 }
 
 static float
-- 
1.7.3.4

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to