From: Ian Romanick Date: Mon, 29 Mar 2010 23:22:38 +0000 (-0700) Subject: Apply implicit conversions to equality operators X-Git-Tag: 062012170305~10660^2~625^2~515 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=212b0327b47033442842a7be3d7fb10e08e2bf66;p=profile%2Fivi%2Fmesa.git Apply implicit conversions to equality operators --- diff --git a/ast_to_hir.cpp b/ast_to_hir.cpp index 31cd01e..3450d38 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;