[Mesa-dev] [PATCH 10/16] glsl: Add ir_binop_add to get_range

Ian Romanick idr at freedesktop.org
Wed Nov 19 10:57:10 PST 2014


On 11/16/2014 05:51 PM, Thomas Helland wrote:
> ---
>  src/glsl/opt_minmax.cpp | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/src/glsl/opt_minmax.cpp b/src/glsl/opt_minmax.cpp
> index 1aa4611..9852dd9 100644
> --- a/src/glsl/opt_minmax.cpp
> +++ b/src/glsl/opt_minmax.cpp
> @@ -326,6 +326,15 @@ get_range(ir_rvalue *rval)
>           // We can get the intersection here to limit the range even more
>           return range_intersection(r0, minmax_range(low, high));
>  
> +      case ir_binop_add:
> +         r0 = get_range(expr->operands[0]);
> +         r1 = get_range(expr->operands[1]);
> +         if(r0.low && r1.low)
              ^
              Space

> +            low = add(r0.low, r1.low)->constant_expression_value();

Blank line here.

> +         if(r0.high && r1.high)
              ^
              Space

> +            high = add(r0.high, r1.high)->constant_expression_value();

Blank line here.

> +         return minmax_range(low, high);
> +
>        default:
>           break;
>        }
> 

With the whitespace issues fixed, this patch is

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>



More information about the mesa-dev mailing list