Mesa (glsl2): glsl2: Fix typo in clamp() constant builtin using uint instead of int.

Eric Anholt anholt at kemper.freedesktop.org
Tue Aug 3 00:51:21 UTC 2010


Module: Mesa
Branch: glsl2
Commit: c8babd5d9bba75c9f38f384f9cb3587e3543cc28
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c8babd5d9bba75c9f38f384f9cb3587e3543cc28

Author: Eric Anholt <eric at anholt.net>
Date:   Mon Aug  2 17:49:01 2010 -0700

glsl2: Fix typo in clamp() constant builtin using uint instead of int.

I take back the bad things I've said about the signed/unsigned
comparison warning now.

---

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

diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index 915d362..06bea2b 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -856,7 +856,7 @@ ir_call::constant_expression_value()
 	    break;
 	 case GLSL_TYPE_INT:
 	    data.i[c] = CLAMP(op[0]->value.i[c], op[1]->value.i[c1],
-			      op[2]->value.u[c2]);
+			      op[2]->value.i[c2]);
 	    break;
 	 case GLSL_TYPE_FLOAT:
 	    data.f[c] = CLAMP(op[0]->value.f[c], op[1]->value.f[c1],




More information about the mesa-commit mailing list