+
+ if (native_integers) {
+ if ((expr != NULL) && (expr->get_num_operands() == 2)) {
+ enum glsl_base_type type = expr->operands[0]->type->base_type;
+ if (type == GLSL_TYPE_INT || type == GLSL_TYPE_UINT ||
+ type == GLSL_TYPE_BOOL) {
+ if (expr->operation == ir_binop_equal) {
+ if (expr->operands[0]->is_zero()) {
+ src_ir = expr->operands[1];
+ switch_order = true;
+ }
+ else if (expr->operands[1]->is_zero()) {
+ src_ir = expr->operands[0];
+ switch_order = true;
+ }
+ }
+ else if (expr->operation == ir_binop_nequal) {
+ if (expr->operands[0]->is_zero()) {
+ src_ir = expr->operands[1];
+ }
+ else if (expr->operands[1]->is_zero()) {
+ src_ir = expr->operands[0];
+ }
+ }
+ }
+ }
+
+ src_ir->accept(this);
+ return switch_order;
+ }
+