Mesa (glsl2): ir_to_mesa: Check the right element for matrix * scalar multiplication.

Eric Anholt anholt at kemper.freedesktop.org
Mon Jun 28 13:30:13 PDT 2010


Module: Mesa
Branch: glsl2
Commit: ad2dc740b95f91f66d57dffe2840dffdefce1c1a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ad2dc740b95f91f66d57dffe2840dffdefce1c1a

Author: Eric Anholt <eric at anholt.net>
Date:   Sun Jun 27 21:07:21 2010 -0700

ir_to_mesa: Check the right element for matrix * scalar multiplication.

---

 src/mesa/shader/ir_to_mesa.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/mesa/shader/ir_to_mesa.cpp b/src/mesa/shader/ir_to_mesa.cpp
index a0217bf..8541906 100644
--- a/src/mesa/shader/ir_to_mesa.cpp
+++ b/src/mesa/shader/ir_to_mesa.cpp
@@ -579,7 +579,7 @@ ir_to_mesa_visitor::visit(ir_expression *ir)
    case ir_binop_mul:
       if (ir->operands[0]->type->is_matrix() &&
 	  !ir->operands[1]->type->is_matrix()) {
-	 if (ir->operands[0]->type->is_scalar()) {
+	 if (ir->operands[1]->type->is_scalar()) {
 	    ir_to_mesa_dst_reg dst_column = result_dst;
 	    ir_to_mesa_src_reg src_column = op[0];
 	    for (int i = 0; i < ir->operands[0]->type->matrix_columns; i++) {



More information about the mesa-commit mailing list