Re: [Mesa-dev] [RFCv0 0/8] gallium: add support for NIR as alternate IR

2015-10-20 Thread Rob Clark
On Tue, Oct 20, 2015 at 11:21 AM, Marek Olšák wrote: > On Tue, Oct 20, 2015 at 5:17 PM, Ilia Mirkin wrote: >> On Tue, Oct 20, 2015 at 9:10 AM, Marek Olšák wrote: >>> On Tue, Oct 20, 2015 at 2:37 PM, Rob Clark wrote: On Tue, Oct 20, 2015 at 6:49 AM, Marek Olšák wrote: > On Tue, Oct 20,

Re: [Mesa-dev] [RFCv0 0/8] gallium: add support for NIR as alternate IR

2015-10-20 Thread Marek Olšák
On Tue, Oct 20, 2015 at 5:17 PM, Ilia Mirkin wrote: > On Tue, Oct 20, 2015 at 9:10 AM, Marek Olšák wrote: >> On Tue, Oct 20, 2015 at 2:37 PM, Rob Clark wrote: >>> On Tue, Oct 20, 2015 at 6:49 AM, Marek Olšák wrote: On Tue, Oct 20, 2015 at 3:51 AM, Rob Clark wrote: > On Mon, Oct 19, 20

Re: [Mesa-dev] [RFCv0 0/8] gallium: add support for NIR as alternate IR

2015-10-20 Thread Ilia Mirkin
On Tue, Oct 20, 2015 at 9:10 AM, Marek Olšák wrote: > On Tue, Oct 20, 2015 at 2:37 PM, Rob Clark wrote: >> On Tue, Oct 20, 2015 at 6:49 AM, Marek Olšák wrote: >>> On Tue, Oct 20, 2015 at 3:51 AM, Rob Clark wrote: On Mon, Oct 19, 2015 at 8:53 PM, Marek Olšák wrote: > Yes, drivers need

Re: [Mesa-dev] [RFCv0 0/8] gallium: add support for NIR as alternate IR

2015-10-20 Thread Marek Olšák
On Tue, Oct 20, 2015 at 2:37 PM, Rob Clark wrote: > On Tue, Oct 20, 2015 at 6:49 AM, Marek Olšák wrote: >> On Tue, Oct 20, 2015 at 3:51 AM, Rob Clark wrote: >>> On Mon, Oct 19, 2015 at 8:53 PM, Marek Olšák wrote: Yes, drivers need to "dup" tokens if they want to keep them. Their lifet

Re: [Mesa-dev] [RFCv0 0/8] gallium: add support for NIR as alternate IR

2015-10-20 Thread Rob Clark
On Tue, Oct 20, 2015 at 6:49 AM, Marek Olšák wrote: > On Tue, Oct 20, 2015 at 3:51 AM, Rob Clark wrote: >> On Mon, Oct 19, 2015 at 8:53 PM, Marek Olšák wrote: >>> Yes, drivers need to "dup" tokens if they want to keep them. Their >>> lifetime is the create function and that's it. st/mesa only ke

Re: [Mesa-dev] [RFCv0 0/8] gallium: add support for NIR as alternate IR

2015-10-20 Thread Marek Olšák
On Tue, Oct 20, 2015 at 3:51 AM, Rob Clark wrote: > On Mon, Oct 19, 2015 at 8:53 PM, Marek Olšák wrote: >> Yes, drivers need to "dup" tokens if they want to keep them. Their >> lifetime is the create function and that's it. st/mesa only keeps the >> tokens for vertex shaders, because it needs for

Re: [Mesa-dev] [RFCv0 0/8] gallium: add support for NIR as alternate IR

2015-10-19 Thread Rob Clark
On Mon, Oct 19, 2015 at 8:53 PM, Marek Olšák wrote: > Yes, drivers need to "dup" tokens if they want to keep them. Their > lifetime is the create function and that's it. st/mesa only keeps the > tokens for vertex shaders, because it needs for emulating some > features with the Draw module. It is

Re: [Mesa-dev] [RFCv0 0/8] gallium: add support for NIR as alternate IR

2015-10-19 Thread Marek Olšák
Yes, drivers need to "dup" tokens if they want to keep them. Their lifetime is the create function and that's it. st/mesa only keeps the tokens for vertex shaders, because it needs for emulating some features with the Draw module. I think there are 2 groups of people: - one would be okay with nuki

Re: [Mesa-dev] [RFCv0 0/8] gallium: add support for NIR as alternate IR

2015-10-19 Thread Roland Scheidegger
The overall idea looks quite sane to me. Albeit obviously as you mentioned you'd really have to support all shader stages and deal with the variants (though there aren't many left). Roland Am 19.10.2015 um 21:54 schrieb Rob Clark: > From: Rob Clark > > (grr, resend to the right list..) > > Sti

[Mesa-dev] [RFCv0 0/8] gallium: add support for NIR as alternate IR

2015-10-19 Thread Rob Clark
From: Rob Clark (grr, resend to the right list..) Still quite rough around the edges, but now it's at the point of sorta- kinda-working-sometimes. So I guess time to get wider feedback. The initial goal is to figure out things that glsl_to_nir does differently from tgsi_to_nir, so we can fix t

Re: [Mesa-dev] [RFCv0 0/8] gallium: add support for NIR as alternate IR

2015-10-19 Thread Rob Clark
On Mon, Oct 19, 2015 at 3:51 PM, Ilia Mirkin wrote: > On Mon, Oct 19, 2015 at 3:47 PM, Rob Clark wrote: >> Also, there is some trivial shader variant handling in mesa st which >> would have to be ported to NIR. Or, perhaps, just somehow expose the >> shader key to the driver. (Currently most dr