On Fri, Sep 19, 2014 at 1:10 PM, Jason Ekstrand <ja...@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.ekstr...@intel.com>
> Cc: Kristian Høgsberg <k...@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 --
and pending other comments:

Reviewed-by: Matt Turner <matts...@gmail.com>

Also, Cc'ing Kristian, who I don't think has seen this patch yet.
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to