summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-03-29 16:22:38 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-03-29 16:29:26 -0700
commit212b0327b47033442842a7be3d7fb10e08e2bf66 (patch)
treea77e58cb0533baa4c82b169b8c15fd4f9daa3df6
parent0150f5f20edaef96520af5d1bbed0e62e24918e5 (diff)
Apply implicit conversions to equality operators
-rw-r--r--ast_to_hir.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp
index 31cd01eda8..3450d3889c 100644
--- a/ast_to_hir.cpp
+++ b/ast_to_hir.cpp
@@ -660,8 +660,9 @@ ast_expression::hir(exec_list *instructions,
* applied to one operand that can make them match, in which
* case this conversion is done."
*/
- /* FINISHME: Apply implicit conversions */
- if (op[0]->type != op[1]->type) {
+ if ((!apply_implicit_conversion(op[0]->type, & op[1], state)
+ && !apply_implicit_conversion(op[1]->type, & op[0], state))
+ || (op[0]->type != op[1]->type)) {
_mesa_glsl_error(& loc, state, "operands of `%s' must have the same "
"type", (this->oper == ast_equal) ? "==" : "!=");
error_emitted = true;