Re: [Mesa-dev] Question about implementing viewport transfer and const load in nir

2017-09-04 Thread Nicolai Hähnle
On 30.08.2017 16:44, Rob Clark wrote: On Wed, Aug 30, 2017 at 10:18 AM, Qiang Yu wrote: On Wed, Aug 30, 2017 at 9:03 PM, Rob Clark wrote: On Wed, Aug 30, 2017 at 3:26 AM, Qiang Yu wrote: btw, does lima have some way to write to memory from cmdstream (ie. without setting up a full blown draw

Re: [Mesa-dev] Question about implementing viewport transfer and const load in nir

2017-08-30 Thread Rob Clark
On Wed, Aug 30, 2017 at 10:18 AM, Qiang Yu wrote: > On Wed, Aug 30, 2017 at 9:03 PM, Rob Clark wrote: >> On Wed, Aug 30, 2017 at 3:26 AM, Qiang Yu wrote: btw, does lima have some way to write to memory from cmdstream (ie. without setting up a full blown draw)? If so perhaps you could

Re: [Mesa-dev] Question about implementing viewport transfer and const load in nir

2017-08-30 Thread Qiang Yu
On Wed, Aug 30, 2017 at 9:03 PM, Rob Clark wrote: > On Wed, Aug 30, 2017 at 3:26 AM, Qiang Yu wrote: >>> btw, does lima have some way to write to memory from cmdstream (ie. >>> without setting up a full blown draw)? If so perhaps you could get >>> away with leaving some extra space at the end of

Re: [Mesa-dev] Question about implementing viewport transfer and const load in nir

2017-08-30 Thread Rob Clark
On Wed, Aug 30, 2017 at 3:26 AM, Qiang Yu wrote: >> btw, does lima have some way to write to memory from cmdstream (ie. >> without setting up a full blown draw)? If so perhaps you could get >> away with leaving some extra space at the end of your uniform buffer >> that you copy driver internal un

Re: [Mesa-dev] Question about implementing viewport transfer and const load in nir

2017-08-30 Thread Qiang Yu
> btw, does lima have some way to write to memory from cmdstream (ie. > without setting up a full blown draw)? If so perhaps you could get > away with leaving some extra space at the end of your uniform buffer > that you copy driver internal uniforms into before kicking the draw? Unfortunately lim

Re: [Mesa-dev] Question about implementing viewport transfer and const load in nir

2017-08-30 Thread Qiang Yu
> In my case, VC4 has lots of custom state-dependent uniforms, and uniform > upload is where we spend most of our CPU time (basically each draw call > needs to re-upload the uniform stream, and the stream has to be in the > order they will be used by instructions, rather than where they appear > in

Re: [Mesa-dev] Question about implementing viewport transfer and const load in nir

2017-08-30 Thread Qiang Yu
Thanks Kenneth, here attach my RFC prototype patch implementing these, and comments follows. >> When working on lima gp compiler, I come across two problems about >> inserting extra uniform >> and instructions in nir for the driver and don't know where's the >> right place to do it. So I'd like >>

Re: [Mesa-dev] Question about implementing viewport transfer and const load in nir

2017-08-29 Thread Rob Clark
On Sat, Aug 26, 2017 at 9:40 AM, Qiang Yu wrote: > Hi guys, > > When working on lima gp compiler, I come across two problems about > inserting extra uniform > and instructions in nir for the driver and don't know where's the > right place to do it. So I'd like > to hear your opinion and if there's

Re: [Mesa-dev] Question about implementing viewport transfer and const load in nir

2017-08-28 Thread Eric Anholt
Kenneth Graunke writes: > [ Unknown signature status ] > On Saturday, August 26, 2017 6:40:14 AM PDT Qiang Yu wrote: >> Hi guys, >> >> When working on lima gp compiler, I come across two problems about >> inserting extra uniform >> and instructions in nir for the driver and don't know where's th

Re: [Mesa-dev] Question about implementing viewport transfer and const load in nir

2017-08-27 Thread Kenneth Graunke
On Saturday, August 26, 2017 6:40:14 AM PDT Qiang Yu wrote: > Hi guys, > > When working on lima gp compiler, I come across two problems about > inserting extra uniform > and instructions in nir for the driver and don't know where's the > right place to do it. So I'd like > to hear your opinion and

[Mesa-dev] Question about implementing viewport transfer and const load in nir

2017-08-26 Thread Qiang Yu
Hi guys, When working on lima gp compiler, I come across two problems about inserting extra uniform and instructions in nir for the driver and don't know where's the right place to do it. So I'd like to hear your opinion and if there's other driver already did so. 1. viewport transfer lima gp nee