[Mesa-dev] [PATCH 1/3] glsl: Use saved values instead of recomputing them.
Paul Berry
stereotype441 at gmail.com
Tue Oct 22 00:23:25 CEST 2013
On 16 October 2013 16:56, Matt Turner <mattst88 at gmail.com> wrote:
> ---
> src/glsl/opt_algebraic.cpp | 12 ++++--------
> 1 file changed, 4 insertions(+), 8 deletions(-)
>
Series is:
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
>
> diff --git a/src/glsl/opt_algebraic.cpp b/src/glsl/opt_algebraic.cpp
> index 3e5802e..b915f3c 100644
> --- a/src/glsl/opt_algebraic.cpp
> +++ b/src/glsl/opt_algebraic.cpp
> @@ -257,11 +257,9 @@ ir_algebraic_visitor::handle_expression(ir_expression
> *ir)
> * folding.
> */
> if (op_const[0] && !op_const[1])
> - reassociate_constant(ir, 0, op_const[0],
> - ir->operands[1]->as_expression());
> + reassociate_constant(ir, 0, op_const[0], op_expr[1]);
> if (op_const[1] && !op_const[0])
> - reassociate_constant(ir, 1, op_const[1],
> - ir->operands[0]->as_expression());
> + reassociate_constant(ir, 1, op_const[1], op_expr[0]);
> break;
>
> case ir_binop_sub:
> @@ -315,11 +313,9 @@ ir_algebraic_visitor::handle_expression(ir_expression
> *ir)
> * constant folding.
> */
> if (op_const[0] && !op_const[1])
> - reassociate_constant(ir, 0, op_const[0],
> - ir->operands[1]->as_expression());
> + reassociate_constant(ir, 0, op_const[0], op_expr[1]);
> if (op_const[1] && !op_const[0])
> - reassociate_constant(ir, 1, op_const[1],
> - ir->operands[0]->as_expression());
> + reassociate_constant(ir, 1, op_const[1], op_expr[0]);
>
> break;
>
> --
> 1.8.3.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131021/18396101/attachment.html>
More information about the mesa-dev
mailing list