[Mesa-dev] [PATCH v2 02/53] compiler/nir: add nir_fadd_imm() and nir_fadd_imm() helpers

Jason Ekstrand jason at jlekstrand.net
Wed Dec 19 16:27:30 UTC 2018


The commit message says fadd twice.

On Wed, Dec 19, 2018 at 5:51 AM Iago Toral Quiroga <itoral at igalia.com>
wrote:

> ---
>  src/compiler/nir/nir_builder.h | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
>
> diff --git a/src/compiler/nir/nir_builder.h
> b/src/compiler/nir/nir_builder.h
> index 74ecde798d5..14f3baab20b 100644
> --- a/src/compiler/nir/nir_builder.h
> +++ b/src/compiler/nir/nir_builder.h
> @@ -571,6 +571,18 @@ nir_imul_imm(nir_builder *build, nir_ssa_def *x,
> uint64_t y)
>     return nir_imul(build, x, nir_imm_intN_t(build, y, x->bit_size));
>  }
>
> +static inline nir_ssa_def *
> +nir_fadd_imm(nir_builder *build, nir_ssa_def *x, double y)
> +{
> +   return nir_fadd(build, x, nir_imm_floatN_t(build, y, x->bit_size));
> +}
> +
> +static inline nir_ssa_def *
> +nir_fmul_imm(nir_builder *build, nir_ssa_def *x, double y)
> +{
> +   return nir_fmul(build, x, nir_imm_floatN_t(build, y, x->bit_size));
> +}
> +
>  static inline nir_ssa_def *
>  nir_pack_bits(nir_builder *b, nir_ssa_def *src, unsigned dest_bit_size)
>  {
> --
> 2.17.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20181219/fed6ce53/attachment.html>


More information about the mesa-dev mailing list