Matt Turner <matts...@gmail.com> writes:

> Doesn't work for analogous && cases, because of NaNs.
>
> total instructions in shared programs: 6195712 -> 6194829 (-0.01%)
> instructions in affected programs:     42000 -> 41117 (-2.10%)
> helped:                                403
> ---
>  src/glsl/nir/nir_opt_algebraic.py | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/src/glsl/nir/nir_opt_algebraic.py 
> b/src/glsl/nir/nir_opt_algebraic.py
> index 34a401a..56dd8be 100644
> --- a/src/glsl/nir/nir_opt_algebraic.py
> +++ b/src/glsl/nir/nir_opt_algebraic.py
> @@ -93,6 +93,8 @@ optimizations = [
>     (('fsat', a), ('fmin', ('fmax', a, 0.0), 1.0), 'options->lower_fsat'),
>     (('fsat', ('fsat', a)), ('fsat', a)),
>     (('fmin', ('fmax', ('fmin', ('fmax', a, 0.0), 1.0), 0.0), 1.0), ('fmin', 
> ('fmax', a, 0.0), 1.0)),
> +   (('ior', ('flt', a, b), ('flt', a, c)), ('flt', a, ('fmax', b, c))),
> +   (('ior', ('fge', a, b), ('fge', a, c)), ('fge', a, ('fmin', b, c))),

In the subject, I think you meant "max" instead of "min".

Other than this, my note in #5, and conditioning the new flrps on
!lower_flrp if I land my patch first, 1-7 are:

Reviewed-by: Eric Anholt <e...@anholt.net>

Attachment: signature.asc
Description: PGP signature

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to