glsl: fix matrix type check in ir_algebraic
authorAras Pranckevicius <aras@unity3d.com>
Tue, 30 Nov 2010 21:24:44 +0000 (13:24 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 30 Nov 2010 21:32:00 +0000 (13:32 -0800)
Fixes glsl-mat-mul-1.

src/glsl/opt_algebraic.cpp

index 3c9af85f312bd17b2ab3143d7dee4c9f9dbf8251..20f6159f0e689449352917e311224e5696a51e4e 100644 (file)
@@ -123,8 +123,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;