Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-19 Thread Jason Ekstrand
On Mon, Mar 19, 2018 at 10:21 AM, Dylan Baker wrote: > Quoting Jason Ekstrand (2018-03-17 23:37:51) > > On Sat, Mar 17, 2018 at 10:32 PM, Dylan Baker > wrote: > > > > Quoting Jason Ekstrand (2018-03-17 09:53:13) > > > On March 16, 2018 23:36:50 Dylan Baker > wrote: > > > > > > >

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-19 Thread Dylan Baker
Quoting Jason Ekstrand (2018-03-17 23:37:51) > On Sat, Mar 17, 2018 at 10:32 PM, Dylan Baker wrote: > > Quoting Jason Ekstrand (2018-03-17 09:53:13) > > On March 16, 2018 23:36:50 Dylan Baker wrote: > > > > > Quoting Rob Clark (2018-03-16 14:25:09) > > >> On Fri, Mar 16, 2018

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-17 Thread Jason Ekstrand
On Sat, Mar 17, 2018 at 10:32 PM, Dylan Baker wrote: > Quoting Jason Ekstrand (2018-03-17 09:53:13) > > On March 16, 2018 23:36:50 Dylan Baker wrote: > > > > > Quoting Rob Clark (2018-03-16 14:25:09) > > >> On Fri, Mar 16, 2018 at 4:30 PM, Dylan Baker > wrote: > > >> > Quoting Rob Clark (2018-0

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-17 Thread Dylan Baker
Quoting Jason Ekstrand (2018-03-17 09:53:13) > On March 16, 2018 23:36:50 Dylan Baker wrote: > > > Quoting Rob Clark (2018-03-16 14:25:09) > >> On Fri, Mar 16, 2018 at 4:30 PM, Dylan Baker wrote: > >> > Quoting Rob Clark (2018-03-16 12:20:10) > >> >> On Fri, Mar 16, 2018 at 3:13 PM, Jason Ekstra

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-17 Thread Rob Clark
On Fri, Mar 16, 2018 at 2:28 PM, Dylan Baker wrote: > Quoting Rob Clark (2018-03-15 18:43:28) >> I threatened to do this a long time ago.. I probably *should* have done >> it a long time ago when there where many fewer intrinsics. But the >> system of macro/#include magic for dealing with intrins

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-17 Thread Jason Ekstrand
On March 16, 2018 23:36:50 Dylan Baker wrote: Quoting Rob Clark (2018-03-16 14:25:09) On Fri, Mar 16, 2018 at 4:30 PM, Dylan Baker wrote: > Quoting Rob Clark (2018-03-16 12:20:10) >> On Fri, Mar 16, 2018 at 3:13 PM, Jason Ekstrand wrote: >> > On Fri, Mar 16, 2018 at 11:53 AM, Dylan Baker

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Dylan Baker
Quoting Rob Clark (2018-03-16 14:25:09) > On Fri, Mar 16, 2018 at 4:30 PM, Dylan Baker wrote: > > Quoting Rob Clark (2018-03-16 12:20:10) > >> On Fri, Mar 16, 2018 at 3:13 PM, Jason Ekstrand > >> wrote: > >> > On Fri, Mar 16, 2018 at 11:53 AM, Dylan Baker > >> > wrote: > >> >> > >> >> Quoting

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Rob Clark
On Fri, Mar 16, 2018 at 4:30 PM, Dylan Baker wrote: > Quoting Rob Clark (2018-03-16 12:20:10) >> On Fri, Mar 16, 2018 at 3:13 PM, Jason Ekstrand wrote: >> > On Fri, Mar 16, 2018 at 11:53 AM, Dylan Baker wrote: >> >> >> >> Quoting Jason Ekstrand (2018-03-16 11:38:47) >> >> > On Fri, Mar 16, 2018

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Dylan Baker
Quoting Rob Clark (2018-03-16 12:20:10) > On Fri, Mar 16, 2018 at 3:13 PM, Jason Ekstrand wrote: > > On Fri, Mar 16, 2018 at 11:53 AM, Dylan Baker wrote: > >> > >> Quoting Jason Ekstrand (2018-03-16 11:38:47) > >> > On Fri, Mar 16, 2018 at 11:28 AM, Dylan Baker > >> > wrote: > >> > > >> > in

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Rob Clark
On Fri, Mar 16, 2018 at 3:13 PM, Jason Ekstrand wrote: > On Fri, Mar 16, 2018 at 11:53 AM, Dylan Baker wrote: >> >> Quoting Jason Ekstrand (2018-03-16 11:38:47) >> > On Fri, Mar 16, 2018 at 11:28 AM, Dylan Baker >> > wrote: >> > >> > intr_opcodes = { >> > 'nop': Intrinsic('nop', flag

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Jason Ekstrand
On Fri, Mar 16, 2018 at 11:53 AM, Dylan Baker wrote: > Quoting Jason Ekstrand (2018-03-16 11:38:47) > > On Fri, Mar 16, 2018 at 11:28 AM, Dylan Baker > wrote: > > > > intr_opcodes = { > > 'nop': Intrinsic('nop', flags=[CAN_ELIMINATE]), > > ... > > } > > > > I prefer t

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Dylan Baker
Quoting Rob Clark (2018-03-16 11:45:56) > On Fri, Mar 16, 2018 at 2:28 PM, Dylan Baker wrote: > > Quoting Rob Clark (2018-03-15 18:43:28) > >> I threatened to do this a long time ago.. I probably *should* have done > >> it a long time ago when there where many fewer intrinsics. But the > >> syste

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Dylan Baker
Quoting Jason Ekstrand (2018-03-16 11:38:47) > On Fri, Mar 16, 2018 at 11:28 AM, Dylan Baker wrote: > > intr_opcodes = { >     'nop': Intrinsic('nop', flags=[CAN_ELIMINATE]), >     ... > } > > I prefer this since each dictionary is clearly created without a function > obs

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Rob Clark
On Fri, Mar 16, 2018 at 2:28 PM, Dylan Baker wrote: > Quoting Rob Clark (2018-03-15 18:43:28) >> I threatened to do this a long time ago.. I probably *should* have done >> it a long time ago when there where many fewer intrinsics. But the >> system of macro/#include magic for dealing with intrins

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Jason Ekstrand
On Fri, Mar 16, 2018 at 11:28 AM, Dylan Baker wrote: > Quoting Rob Clark (2018-03-15 18:43:28) > > > diff --git a/src/compiler/nir/nir_intrinsics.py b/src/compiler/nir/nir_ > intrinsics.py > > new file mode 100644 > > index 000..6bb6603586e > > --- /dev/null > > +++ b/src/compiler/nir/nir

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Dylan Baker
Quoting Rob Clark (2018-03-15 18:43:28) > I threatened to do this a long time ago.. I probably *should* have done > it a long time ago when there where many fewer intrinsics. But the > system of macro/#include magic for dealing with intrinsics is a bit > annoying, and python has the nice property

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Rob Clark
On Fri, Mar 16, 2018 at 11:18 AM, Emil Velikov wrote: > On 16 March 2018 at 12:41, Rob Clark wrote: >> Ok, I came up with: >> >> https://hastebin.com/bulilojupo.cpp >> >> if you want to double check my methodology. >> >> It spotted a couple small mistakes, which I've fixed up locally. Will >>

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Emil Velikov
On 16 March 2018 at 12:41, Rob Clark wrote: > Ok, I came up with: > > https://hastebin.com/bulilojupo.cpp > > if you want to double check my methodology. > > It spotted a couple small mistakes, which I've fixed up locally. Will > resend once I finish autotools build support.. hmm, and I guess t

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Rob Clark
Ok, I came up with: https://hastebin.com/bulilojupo.cpp if you want to double check my methodology. It spotted a couple small mistakes, which I've fixed up locally. Will resend once I finish autotools build support.. hmm, and I guess there is scons too.. *sigh* Fwiw, one if the bugs was from

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-16 Thread Rob Clark
I haven't done anything to verify yet, but I was thinking along the same lines of just hacking up a .c program to compare both sets of tables. There are enough intrinsics, that somewhere I probably transcribed one wrong and visual inspection of the tables doesn't seem sane ;-) BR, -R On Fri, Mar

Re: [Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-15 Thread Jason Ekstrand
I think I like this in principal. One question would be what have you done to verify everything is the same? When I've done things like this in the past, I've written a bit of C code to compare all the info struct to ensure that the two generate the same thing. On March 15, 2018 18:43:59 Rob

[Mesa-dev] [PATCH v0] nir: mako all the intrinsics

2018-03-15 Thread Rob Clark
I threatened to do this a long time ago.. I probably *should* have done it a long time ago when there where many fewer intrinsics. But the system of macro/#include magic for dealing with intrinsics is a bit annoying, and python has the nice property of optional fxn params, making it possible to de