[Mesa-dev] [PATCH 01/12] i965/fs: Manually generate the meta fast-clear shader

Kenneth Graunke kenneth at whitecape.org
Tue Sep 23 17:53:59 PDT 2014


On Tuesday, September 23, 2014 12:25:05 PM Matt Turner wrote:
> On Fri, Sep 19, 2014 at 1:10 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> > Previously, we were generating the fast-clear shader from GLSL.  The
> > problem is that fast clears require that we use a replicated write rather
> > than a regular write instruction.  In order to get this we had a
> > complicated and somewhat fragile optimization pass that looked for places
> > where we can use a replicated write and used it.  Since replicated writes
> > have a lot of restrictions, we only ever use them for fast-clear
> > operations.
> >
> > This commit replaces the optimization pass with a function that just
> > generates the shader we want.  This is a) less code, b) less fragile than
> > the optimization pass, and c) generates a more efficient shader.
> >
> > Signed-off-by: Jason Ekstrand <jason.ekstrand at intel.com>
> > Cc: Kristian Høgsberg <krh at bitplanet.net>
> 
> I think this is probably a good idea, and certainly simplifies things.
> It does prevent us from potentially recognizing other non-clear
> shaders after optimization though. I don't know all of the state
> requirements for using repdata so I don't think I can properly
> evaluate the benefit or difficulty in doing that. I'd defer to Ken --

Yeah, the repdata message ignores lots of state, and you get GPU hangs if certain state is set.  This is not documented.  Eric and I tried to pin down exactly what state is bad, and made some progress, but never quite managed to sort it out.

So, while we should definitely consider using it in more cases...I'm not concerned about losing the optimization capability for now.

I have Ironlake repdata clears working, but the patches relied on gross hacks to get the optimization working.  With this, it'll be much easier.  So,

Acked-by: Kenneth Graunke <kenneth at whitecape.org>

I'll try and send out Ironlake stuff once it lands (and try earlier hardware too - it should be the same).

> and pending other comments:
> 
> Reviewed-by: Matt Turner <mattst88 at gmail.com>
> 
> Also, Cc'ing Kristian, who I don't think has seen this patch yet.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140923/485b8f0f/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20140923/485b8f0f/attachment.sig>


More information about the mesa-dev mailing list