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

Author: Kenneth Graunke <kenn...@whitecape.org>
Date:   Wed Aug 18 12:06:25 2010 -0700

ir_constant_expression: Implement equal/notEqual for booleans.

Calls to equal(bvec, bvec) or notEqual(bvec, bvec) previously caused an
assertion.  Fixes piglit tests glsl-const-builtin-equal-bool and
glsl-const-builtin-notEqual-bool.

---

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

diff --git a/src/glsl/ir_constant_expression.cpp 
b/src/glsl/ir_constant_expression.cpp
index 0a92424..54f14d1 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -904,6 +904,9 @@ ir_call::constant_expression_value()
         case GLSL_TYPE_FLOAT:
            data.b[c] = op[0]->value.f[c] == op[1]->value.f[c];
            break;
+        case GLSL_TYPE_BOOL:
+           data.b[c] = op[0]->value.b[c] == op[1]->value.b[c];
+           break;
         default:
            assert(!"Should not get here.");
         }
@@ -1047,6 +1050,9 @@ ir_call::constant_expression_value()
         case GLSL_TYPE_FLOAT:
            data.b[c] = op[0]->value.f[c] != op[1]->value.f[c];
            break;
+        case GLSL_TYPE_BOOL:
+           data.b[c] = op[0]->value.b[c] != op[1]->value.b[c];
+           break;
         default:
            assert(!"Should not get here.");
         }

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

Reply via email to