[Mesa-dev] [PATCH 03/13] nir/builder: add nir_imm_double()

Jason Ekstrand jason at jlekstrand.net
Fri Apr 22 22:18:55 UTC 2016


Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>

On Tue, Apr 12, 2016 at 1:05 AM, Samuel Iglesias Gonsálvez <
siglesias at igalia.com> wrote:

> From: Connor Abbott <connor.w.abbott at intel.com>
>
> ---
>  src/compiler/nir/nir_builder.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/src/compiler/nir/nir_builder.h
> b/src/compiler/nir/nir_builder.h
> index 84fc9bf..5787ba8 100644
> --- a/src/compiler/nir/nir_builder.h
> +++ b/src/compiler/nir/nir_builder.h
> @@ -116,6 +116,14 @@ nir_imm_float(nir_builder *build, float x)
>  }
>
>  static inline nir_ssa_def *
> +nir_imm_double(nir_builder *build, double x)
> +{
> +   nir_const_value v = { { .f64 = {x, 0, 0, 0} } };
> +   nir_ssa_def *def = nir_build_imm(build, 1, v, 64);
> +   return def;
> +}
> +
> +static inline nir_ssa_def *
>  nir_imm_vec4(nir_builder *build, float x, float y, float z, float w)
>  {
>     nir_const_value v;
> --
> 2.5.0
>
> _______________________________________________
> 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/20160422/3d58df97/attachment.html>


More information about the mesa-dev mailing list