[Mesa-dev] [PATCH] nir/builder: Add an int46 immediate helper

Jason Ekstrand jason at jlekstrand.net
Thu Mar 2 02:20:04 UTC 2017


On Wed, Mar 1, 2017 at 6:10 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:

> Probably meant int64 in the subject? (I was all excited to read about
> this new cool int46 type...)
>

Yes.  I've fixed it locally.  Sorry to disappoint.


> On Wed, Mar 1, 2017 at 7:57 PM, Jason Ekstrand <jason at jlekstrand.net>
> wrote:
> > ---
> >  src/compiler/nir/nir_builder.h | 11 +++++++++++
> >  1 file changed, 11 insertions(+)
> >
> > diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_
> builder.h
> > index 2eaa025..1dc56eb 100644
> > --- a/src/compiler/nir/nir_builder.h
> > +++ b/src/compiler/nir/nir_builder.h
> > @@ -253,6 +253,17 @@ nir_imm_int(nir_builder *build, int x)
> >  }
> >
> >  static inline nir_ssa_def *
> > +nir_imm_int64(nir_builder *build, int64_t x)
> > +{
> > +   nir_const_value v;
> > +
> > +   memset(&v, 0, sizeof(v));
> > +   v.i64[0] = x;
> > +
> > +   return nir_build_imm(build, 1, 64, v);
> > +}
> > +
> > +static inline nir_ssa_def *
> >  nir_imm_ivec4(nir_builder *build, int x, int y, int z, int w)
> >  {
> >     nir_const_value v;
> > --
> > 2.5.0.400.gff86faf
> >
> > _______________________________________________
> > 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/20170301/53256012/attachment-0001.html>


More information about the mesa-dev mailing list