This patch is Reviewed-by: Ian Romanick <[email protected]>
On 11/16/2014 05:52 PM, Thomas Helland wrote: > --- > src/glsl/opt_minmax.cpp | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp > index 49a816e..466db8c 100644 > --- a/src/glsl/opt_minmax.cpp > +++ b/src/glsl/opt_minmax.cpp > @@ -293,6 +293,14 @@ get_range(ir_rvalue *rval) > high = larger_constant(r0.high, > abs(r0.low)->constant_expression_value()); > return minmax_range(low, high); > > + case ir_unop_neg: > + r0 = get_range(expr->operands[0]); > + if (r0.high) > + low = neg(r0.high)->constant_expression_value(); > + if (r0.low) > + high = neg(r0.low)->constant_expression_value(); > + return minmax_range(low, high); > + > case ir_unop_sqrt: > case ir_unop_rsq: > case ir_unop_exp: > _______________________________________________ mesa-dev mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/mesa-dev
