<div dir="ltr">On 16 October 2013 16:56, Matt Turner <span dir="ltr"><<a href="mailto:mattst88@gmail.com" target="_blank">mattst88@gmail.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
---<br>
 src/glsl/opt_algebraic.cpp | 12 ++++--------<br>
 1 file changed, 4 insertions(+), 8 deletions(-)<br></blockquote><div><br></div><div>Series is:<br><br></div><div>Reviewed-by: Paul Berry <<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>><br></div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp<br>
index 3e5802e..b915f3c 100644<br>
--- a/src/glsl/opt_algebraic.cpp<br>
+++ b/src/glsl/opt_algebraic.cpp<br>
@@ -257,11 +257,9 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)<br>
        * folding.<br>
        */<br>
       if (op_const[0] && !op_const[1])<br>
-        reassociate_constant(ir, 0, op_const[0],<br>
-                             ir->operands[1]->as_expression());<br>
+        reassociate_constant(ir, 0, op_const[0], op_expr[1]);<br>
       if (op_const[1] && !op_const[0])<br>
-        reassociate_constant(ir, 1, op_const[1],<br>
-                             ir->operands[0]->as_expression());<br>
+        reassociate_constant(ir, 1, op_const[1], op_expr[0]);<br>
       break;<br>
<br>
    case ir_binop_sub:<br>
@@ -315,11 +313,9 @@ ir_algebraic_visitor::handle_expression(ir_expression *ir)<br>
        * constant folding.<br>
        */<br>
       if (op_const[0] && !op_const[1])<br>
-        reassociate_constant(ir, 0, op_const[0],<br>
-                             ir->operands[1]->as_expression());<br>
+        reassociate_constant(ir, 0, op_const[0], op_expr[1]);<br>
       if (op_const[1] && !op_const[0])<br>
-        reassociate_constant(ir, 1, op_const[1],<br>
-                             ir->operands[0]->as_expression());<br>
+        reassociate_constant(ir, 1, op_const[1], op_expr[0]);<br>
<br>
       break;<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
1.8.3.2<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>