Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-31 Thread Rob Clark
On Thu, Dec 31, 2015 at 12:05 PM, Connor Abbott wrote: > On Thu, Dec 31, 2015 at 10:16 AM, Rob Clark wrote: >> On Tue, Dec 29, 2015 at 10:32 AM, Rob Clark wrote: >> If you do this, you'll be back to always needing a mutable copy. Most >> lowering and optimization passes die the moment t

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-31 Thread Connor Abbott
On Thu, Dec 31, 2015 at 10:16 AM, Rob Clark wrote: > On Tue, Dec 29, 2015 at 10:32 AM, Rob Clark wrote: > If you do this, you'll be back to always needing a mutable copy. Most > lowering and optimization passes die the moment they see a register. > You'll > either have to go fi

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-31 Thread Rob Clark
On Tue, Dec 29, 2015 at 10:32 AM, Rob Clark wrote: If you do this, you'll be back to always needing a mutable copy. Most lowering and optimization passes die the moment they see a register. You'll either have to go fix a bunch of stuff up to no-op properly or run vars_t

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-29 Thread Rob Clark
On Tue, Dec 29, 2015 at 12:36 PM, Jason Ekstrand wrote: > > > On Tue, Dec 29, 2015 at 7:32 AM, Rob Clark wrote: >> >> On Mon, Dec 28, 2015 at 4:23 PM, Connor Abbott >> wrote: >> > On Mon, Dec 28, 2015 at 3:25 PM, Rob Clark wrote: >> >>> >> It is a mix.. I do texcoord saturate, clip-plane,

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-29 Thread Jason Ekstrand
On Tue, Dec 29, 2015 at 7:32 AM, Rob Clark wrote: > On Mon, Dec 28, 2015 at 4:23 PM, Connor Abbott > wrote: > > On Mon, Dec 28, 2015 at 3:25 PM, Rob Clark wrote: > >> On Mon, Dec 28, 2015 at 2:05 PM, Jason Ekstrand > wrote: > >>> > >>> > >>> On Mon, Dec 28, 2015 at 10:33 AM, Rob Clark > wrote

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-29 Thread Rob Clark
On Mon, Dec 28, 2015 at 4:23 PM, Connor Abbott wrote: > On Mon, Dec 28, 2015 at 3:25 PM, Rob Clark wrote: >> On Mon, Dec 28, 2015 at 2:05 PM, Jason Ekstrand wrote: >>> >>> >>> On Mon, Dec 28, 2015 at 10:33 AM, Rob Clark wrote: On Mon, Dec 28, 2015 at 1:20 PM, Jason Ekstrand wrot

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-29 Thread Rob Clark
On Mon, Dec 28, 2015 at 3:51 PM, Connor Abbott wrote: > On Mon, Dec 28, 2015 at 3:31 PM, Rob Clark wrote: >> On Mon, Dec 28, 2015 at 1:58 PM, Connor Abbott wrote: >>> On Mon, Dec 28, 2015 at 1:35 PM, Rob Clark wrote: On Mon, Dec 28, 2015 at 12:37 PM, Connor Abbott wrote: > On Mo

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-28 Thread Connor Abbott
On Mon, Dec 28, 2015 at 3:25 PM, Rob Clark wrote: > On Mon, Dec 28, 2015 at 2:05 PM, Jason Ekstrand wrote: >> >> >> On Mon, Dec 28, 2015 at 10:33 AM, Rob Clark wrote: >>> >>> On Mon, Dec 28, 2015 at 1:20 PM, Jason Ekstrand >>> wrote: >>> > >>> > >>> > On Mon, Dec 28, 2015 at 9:37 AM, Connor Abb

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-28 Thread Connor Abbott
On Mon, Dec 28, 2015 at 3:31 PM, Rob Clark wrote: > On Mon, Dec 28, 2015 at 1:58 PM, Connor Abbott wrote: >> On Mon, Dec 28, 2015 at 1:35 PM, Rob Clark wrote: >>> On Mon, Dec 28, 2015 at 12:37 PM, Connor Abbott wrote: On Mon, Dec 28, 2015 at 10:13 AM, Rob Clark wrote: > On Tue, Dec 22

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-28 Thread Rob Clark
On Mon, Dec 28, 2015 at 1:58 PM, Connor Abbott wrote: > On Mon, Dec 28, 2015 at 1:35 PM, Rob Clark wrote: >> On Mon, Dec 28, 2015 at 12:37 PM, Connor Abbott wrote: >>> On Mon, Dec 28, 2015 at 10:13 AM, Rob Clark wrote: On Tue, Dec 22, 2015 at 10:11 PM, Connor Abbott wrote: > On

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-28 Thread Rob Clark
On Mon, Dec 28, 2015 at 2:05 PM, Jason Ekstrand wrote: > > > On Mon, Dec 28, 2015 at 10:33 AM, Rob Clark wrote: >> >> On Mon, Dec 28, 2015 at 1:20 PM, Jason Ekstrand >> wrote: >> > >> > >> > On Mon, Dec 28, 2015 at 9:37 AM, Connor Abbott >> > wrote: >> >> >> >> On Mon, Dec 28, 2015 at 10:13 AM,

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-28 Thread Jason Ekstrand
On Mon, Dec 28, 2015 at 10:33 AM, Rob Clark wrote: > On Mon, Dec 28, 2015 at 1:20 PM, Jason Ekstrand > wrote: > > > > > > On Mon, Dec 28, 2015 at 9:37 AM, Connor Abbott > wrote: > >> > >> On Mon, Dec 28, 2015 at 10:13 AM, Rob Clark > wrote: > >> > On Tue, Dec 22, 2015 at 10:11 PM, Connor Abbot

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-28 Thread Connor Abbott
On Mon, Dec 28, 2015 at 1:35 PM, Rob Clark wrote: > On Mon, Dec 28, 2015 at 12:37 PM, Connor Abbott wrote: >> On Mon, Dec 28, 2015 at 10:13 AM, Rob Clark wrote: >>> On Tue, Dec 22, 2015 at 10:11 PM, Connor Abbott wrote: On Tue, Dec 22, 2015 at 9:55 PM, Rob Clark wrote: > On Tue, Dec 2

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-28 Thread Rob Clark
On Mon, Dec 28, 2015 at 12:37 PM, Connor Abbott wrote: > On Mon, Dec 28, 2015 at 10:13 AM, Rob Clark wrote: >> On Tue, Dec 22, 2015 at 10:11 PM, Connor Abbott wrote: >>> On Tue, Dec 22, 2015 at 9:55 PM, Rob Clark wrote: On Tue, Dec 22, 2015 at 9:47 PM, Connor Abbott wrote: > On Tue, D

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-28 Thread Rob Clark
On Mon, Dec 28, 2015 at 1:20 PM, Jason Ekstrand wrote: > > > On Mon, Dec 28, 2015 at 9:37 AM, Connor Abbott wrote: >> >> On Mon, Dec 28, 2015 at 10:13 AM, Rob Clark wrote: >> > On Tue, Dec 22, 2015 at 10:11 PM, Connor Abbott >> > wrote: >> >> On Tue, Dec 22, 2015 at 9:55 PM, Rob Clark wrote: >

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-28 Thread Jason Ekstrand
On Mon, Dec 28, 2015 at 9:37 AM, Connor Abbott wrote: > On Mon, Dec 28, 2015 at 10:13 AM, Rob Clark wrote: > > On Tue, Dec 22, 2015 at 10:11 PM, Connor Abbott > wrote: > >> On Tue, Dec 22, 2015 at 9:55 PM, Rob Clark wrote: > >>> On Tue, Dec 22, 2015 at 9:47 PM, Connor Abbott > wrote: > O

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-28 Thread Connor Abbott
On Mon, Dec 28, 2015 at 10:13 AM, Rob Clark wrote: > On Tue, Dec 22, 2015 at 10:11 PM, Connor Abbott wrote: >> On Tue, Dec 22, 2015 at 9:55 PM, Rob Clark wrote: >>> On Tue, Dec 22, 2015 at 9:47 PM, Connor Abbott wrote: On Tue, Dec 22, 2015 at 9:02 PM, Rob Clark wrote: > On Mon, Dec 21

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-28 Thread Rob Clark
On Tue, Dec 22, 2015 at 10:11 PM, Connor Abbott wrote: > On Tue, Dec 22, 2015 at 9:55 PM, Rob Clark wrote: >> On Tue, Dec 22, 2015 at 9:47 PM, Connor Abbott wrote: >>> On Tue, Dec 22, 2015 at 9:02 PM, Rob Clark wrote: On Mon, Dec 21, 2015 at 1:48 PM, Jason Ekstrand wrote: >

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-22 Thread Connor Abbott
On Tue, Dec 22, 2015 at 9:55 PM, Rob Clark wrote: > On Tue, Dec 22, 2015 at 9:47 PM, Connor Abbott wrote: >> On Tue, Dec 22, 2015 at 9:02 PM, Rob Clark wrote: >>> On Mon, Dec 21, 2015 at 1:48 PM, Jason Ekstrand >>> wrote: I think two different concepts of ownership are getting confla

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-22 Thread Rob Clark
On Tue, Dec 22, 2015 at 9:47 PM, Connor Abbott wrote: > On Tue, Dec 22, 2015 at 9:02 PM, Rob Clark wrote: >> On Mon, Dec 21, 2015 at 1:48 PM, Jason Ekstrand wrote: >>> >>> I think two different concepts of ownership are getting conflated here: >>> Right/responsibility to delete and right to modi

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-22 Thread Connor Abbott
On Tue, Dec 22, 2015 at 9:02 PM, Rob Clark wrote: > On Mon, Dec 21, 2015 at 1:48 PM, Jason Ekstrand wrote: >> >> I think two different concepts of ownership are getting conflated here: >> Right/responsibility to delete and right to modify. >> >> The way I understand it, gallium, as it stands, giv

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-22 Thread Rob Clark
On Mon, Dec 21, 2015 at 1:48 PM, Jason Ekstrand wrote: > > I think two different concepts of ownership are getting conflated here: > Right/responsibility to delete and right to modify. > > The way I understand it, gallium, as it stands, gives neither to the driver. > A back-end using NIR requires

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-21 Thread Jason Ekstrand
On Mon, Dec 21, 2015 at 2:24 PM, Marek Olšák wrote: > On Mon, Dec 21, 2015 at 11:20 PM, Jason Ekstrand > wrote: > > > > On Dec 21, 2015 1:37 PM, "Marek Olšák" wrote: > >> > >> On Mon, Dec 21, 2015 at 7:48 PM, Jason Ekstrand > >> wrote: > >> > > >> > On Dec 21, 2015 9:09 AM, "Connor Abbott" wr

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-21 Thread Marek Olšák
On Mon, Dec 21, 2015 at 11:20 PM, Jason Ekstrand wrote: > > On Dec 21, 2015 1:37 PM, "Marek Olšák" wrote: >> >> On Mon, Dec 21, 2015 at 7:48 PM, Jason Ekstrand >> wrote: >> > >> > On Dec 21, 2015 9:09 AM, "Connor Abbott" wrote: >> >> >> >> On Mon, Dec 21, 2015 at 11:45 AM, Marek Olšák wrote: >

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-21 Thread Jason Ekstrand
On Dec 21, 2015 1:37 PM, "Marek Olšák" wrote: > > On Mon, Dec 21, 2015 at 7:48 PM, Jason Ekstrand wrote: > > > > On Dec 21, 2015 9:09 AM, "Connor Abbott" wrote: > >> > >> On Mon, Dec 21, 2015 at 11:45 AM, Marek Olšák wrote: > >> > On Mon, Dec 21, 2015 at 4:38 PM, Connor Abbott > >> > wrote: >

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-21 Thread Marek Olšák
On Mon, Dec 21, 2015 at 7:48 PM, Jason Ekstrand wrote: > > On Dec 21, 2015 9:09 AM, "Connor Abbott" wrote: >> >> On Mon, Dec 21, 2015 at 11:45 AM, Marek Olšák wrote: >> > On Mon, Dec 21, 2015 at 4:38 PM, Connor Abbott >> > wrote: >> >> On Mon, Dec 21, 2015 at 6:39 AM, Marek Olšák wrote: >> >>>

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-21 Thread Jason Ekstrand
On Dec 21, 2015 9:09 AM, "Connor Abbott" wrote: > > On Mon, Dec 21, 2015 at 11:45 AM, Marek Olšák wrote: > > On Mon, Dec 21, 2015 at 4:38 PM, Connor Abbott wrote: > >> On Mon, Dec 21, 2015 at 6:39 AM, Marek Olšák wrote: > >>> On Mon, Dec 21, 2015 at 6:48 AM, Jason Ekstrand wrote: > >

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-21 Thread Connor Abbott
On Mon, Dec 21, 2015 at 11:45 AM, Marek Olšák wrote: > On Mon, Dec 21, 2015 at 4:38 PM, Connor Abbott wrote: >> On Mon, Dec 21, 2015 at 6:39 AM, Marek Olšák wrote: >>> On Mon, Dec 21, 2015 at 6:48 AM, Jason Ekstrand >>> wrote: On Dec 20, 2015 7:43 PM, "Rob Clark" wrote: > >

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-21 Thread Marek Olšák
On Mon, Dec 21, 2015 at 4:38 PM, Connor Abbott wrote: > On Mon, Dec 21, 2015 at 6:39 AM, Marek Olšák wrote: >> On Mon, Dec 21, 2015 at 6:48 AM, Jason Ekstrand wrote: >>> >>> On Dec 20, 2015 7:43 PM, "Rob Clark" wrote: On Sun, Dec 20, 2015 at 10:29 PM, Connor Abbott wrote: >

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-21 Thread Connor Abbott
On Mon, Dec 21, 2015 at 6:39 AM, Marek Olšák wrote: > On Mon, Dec 21, 2015 at 6:48 AM, Jason Ekstrand wrote: >> >> On Dec 20, 2015 7:43 PM, "Rob Clark" wrote: >>> >>> On Sun, Dec 20, 2015 at 10:29 PM, Connor Abbott >>> wrote: >>> > On Sun, Dec 20, 2015 at 10:04 PM, Rob Clark wrote: >>> >> On S

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-21 Thread Marek Olšák
On Mon, Dec 21, 2015 at 6:48 AM, Jason Ekstrand wrote: > > On Dec 20, 2015 7:43 PM, "Rob Clark" wrote: >> >> On Sun, Dec 20, 2015 at 10:29 PM, Connor Abbott >> wrote: >> > On Sun, Dec 20, 2015 at 10:04 PM, Rob Clark wrote: >> >> On Sun, Dec 20, 2015 at 9:12 PM, Jason Ekstrand >> >> wrote: >> >

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-20 Thread Jason Ekstrand
On Dec 20, 2015 7:43 PM, "Rob Clark" wrote: > > On Sun, Dec 20, 2015 at 10:29 PM, Connor Abbott wrote: > > On Sun, Dec 20, 2015 at 10:04 PM, Rob Clark wrote: > >> On Sun, Dec 20, 2015 at 9:12 PM, Jason Ekstrand wrote: > >>> > >>> On Dec 19, 2015 5:55 PM, "Rob Clark" wrote: > > From:

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-20 Thread Rob Clark
On Sun, Dec 20, 2015 at 10:29 PM, Connor Abbott wrote: > On Sun, Dec 20, 2015 at 10:04 PM, Rob Clark wrote: >> On Sun, Dec 20, 2015 at 9:12 PM, Jason Ekstrand wrote: >>> >>> On Dec 19, 2015 5:55 PM, "Rob Clark" wrote: From: Rob Clark Jason, How much do you hate th

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-20 Thread Connor Abbott
On Sun, Dec 20, 2015 at 10:04 PM, Rob Clark wrote: > On Sun, Dec 20, 2015 at 9:12 PM, Jason Ekstrand wrote: >> >> On Dec 19, 2015 5:55 PM, "Rob Clark" wrote: >>> >>> From: Rob Clark >>> >>> Jason, >>> >>> How much do you hate this idea? Seems like an easy alternative to >>> using ralloc ctx's

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-20 Thread Rob Clark
On Sun, Dec 20, 2015 at 9:12 PM, Jason Ekstrand wrote: > > On Dec 19, 2015 5:55 PM, "Rob Clark" wrote: >> >> From: Rob Clark >> >> Jason, >> >> How much do you hate this idea? Seems like an easy alternative to >> using ralloc ctx's to clean up nir variants/clones, which would let >> us drop the

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-20 Thread Jason Ekstrand
On Dec 19, 2015 5:55 PM, "Rob Clark" wrote: > > From: Rob Clark > > Jason, > > How much do you hate this idea? Seems like an easy alternative to > using ralloc ctx's to clean up nir variants/clones, which would let > us drop the parent memctx for nir_shader_create()/clone(), making > it easier t

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-19 Thread Rob Clark
On Sat, Dec 19, 2015 at 9:01 PM, Connor Abbott wrote: > Why don't you just introduce a reference-counted wrapper around a > nir_shader * and pass that around instead? This seems like a > gallium-specific problem, so modifying other things to work around it > doesn't seem so appealing. 1) I wanted

Re: [Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-19 Thread Connor Abbott
Why don't you just introduce a reference-counted wrapper around a nir_shader * and pass that around instead? This seems like a gallium-specific problem, so modifying other things to work around it doesn't seem so appealing. On Sat, Dec 19, 2015 at 8:55 PM, Rob Clark wrote: > From: Rob Clark > >

[Mesa-dev] [RFC] i965: alternative to memctx for cleaning up nir variants

2015-12-19 Thread Rob Clark
From: Rob Clark Jason, How much do you hate this idea? Seems like an easy alternative to using ralloc ctx's to clean up nir variants/clones, which would let us drop the parent memctx for nir_shader_create()/clone(), making it easier to introduce reference counting. --- src/mesa/drivers/dri/i9