[Mesa-dev] [PATCH 01/13] nir/builder: add nir_imm_uint()

Jason Ekstrand jason at jlekstrand.net
Thu Apr 14 20:39:59 UTC 2016


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 | 7 +++++++
>  1 file changed, 7 insertions(+)
>
> diff --git a/src/compiler/nir/nir_builder.h
> b/src/compiler/nir/nir_builder.h
> index 29b13fb..38a1cf7 100644
> --- a/src/compiler/nir/nir_builder.h
> +++ b/src/compiler/nir/nir_builder.h
> @@ -154,6 +154,13 @@ nir_imm_ivec4(nir_builder *build, int x, int y, int
> z, int w)
>  }
>
>  static inline nir_ssa_def *
> +nir_imm_uint(nir_builder *build, unsigned x)
> +{
> +   nir_const_value v = { { .u32 = {x, 0, 0, 0} } };
> +   return nir_build_imm(build, 1, v);
> +}
>

I don't really mind this being a thing, but it's not really needed.
nir_imm_int is exactly the same thing.


> +
> +static inline nir_ssa_def *
>  nir_build_alu(nir_builder *build, nir_op op, nir_ssa_def *src0,
>                nir_ssa_def *src1, nir_ssa_def *src2, nir_ssa_def *src3)
>  {
> --
> 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/20160414/1ff02119/attachment-0001.html>


More information about the mesa-dev mailing list