[Mesa-dev] [PATCH 1/2] nir/lower_source_mods: Don't lower saturate for non-float outputs

Connor Abbott cwabbott0 at gmail.com
Tue Feb 3 12:45:20 PST 2015


Reviewed-by: Connor Abbott <cwabbott0 at gmail.com>

On Tue, Feb 3, 2015 at 3:43 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> ---
>  src/glsl/nir/nir_lower_to_source_mods.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/src/glsl/nir/nir_lower_to_source_mods.c b/src/glsl/nir/nir_lower_to_source_mods.c
> index c3f39bc..d6bf77f 100644
> --- a/src/glsl/nir/nir_lower_to_source_mods.c
> +++ b/src/glsl/nir/nir_lower_to_source_mods.c
> @@ -120,6 +120,10 @@ nir_lower_to_source_mods_block(nir_block *block, void *state)
>        if (!alu->dest.dest.is_ssa)
>           continue;
>
> +      /* We can only saturate float destinations */
> +      if (nir_op_infos[alu->op].output_type != nir_type_float)
> +         continue;
> +
>        if (alu->dest.dest.ssa.if_uses->entries != 0)
>           continue;
>
> --
> 2.2.2
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list