From d320cb84850ca1b2d88f3f1882bc016713903fbd Mon Sep 17 00:00:00 2001
From: Aras Pranckevicius <aras@unity3d.com>
Date: Fri, 22 Oct 2010 11:47:47 +0300
Subject: [PATCH] glsl: fix matrix type check in ir_algebraic

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

diff --git a/src/glsl/ir_algebraic.cpp b/src/glsl/ir_algebraic.cpp
index 2ed66db..323629a 100644
--- a/src/glsl/ir_algebraic.cpp
+++ b/src/glsl/ir_algebraic.cpp
@@ -187,8 +187,8 @@ ir_algebraic_visitor::reassociate_constant(ir_expression *ir1, int const_index,
 
    /* Don't want to even think about matrices. */
    if (ir1->operands[0]->type->is_matrix() ||
-       ir1->operands[0]->type->is_matrix() ||
-       ir2->operands[1]->type->is_matrix() ||
+       ir1->operands[1]->type->is_matrix() ||
+       ir2->operands[0]->type->is_matrix() ||
        ir2->operands[1]->type->is_matrix())
       return false;
 
-- 
1.7.2.3.msysgit.0

