Rob Clark <robdcl...@gmail.com> writes:

> From: Rob Clark <robcl...@freedesktop.org>
>
> Originally you had to have one or the other.  But actually I don't want
> either.  (Or rather I want whatever is the minimum # of instructions.)
>
> TODO: not sure where the best place to insert a check that driver hasn't
> set *both* lower_negate and lower_sub?
>
> Signed-off-by: Rob Clark <robcl...@freedesktop.org>
> ---
>  src/glsl/nir/nir.h                | 2 ++
>  src/glsl/nir/nir_opt_algebraic.py | 4 ++--
>  2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
> index 6f53052..84104de 100644
> --- a/src/glsl/nir/nir.h
> +++ b/src/glsl/nir/nir.h
> @@ -1371,6 +1371,8 @@ typedef struct nir_shader_compiler_options {
>     bool lower_fsqrt;
>     /** lowers fneg and ineg to fsub and isub. */
>     bool lower_negate;
> +   /** lowers fsub and isub to fadd+fneg and iadd+ineg. */
> +   bool lower_sub;

i965 is relying on lower_negate being false implying the fsub
transformation, so you should go edit their nir_options with this
commit.  Other than that, seems like a reasonable idea.

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