[Mesa-dev] [PATCH 7/8] glsl: Optimize "if (cond) discard; " to a conditional discard.

Kenneth Graunke kenneth at whitecape.org
Tue Feb 24 11:26:13 PST 2015


On Tuesday, February 24, 2015 07:53:48 AM Jason Ekstrand wrote:
> On Tue, Feb 24, 2015 at 2:19 AM, Kenneth Graunke <kenneth at whitecape.org>
> wrote:
> 
> > st_glsl_to_tgsi and ir_to_mesa have handled conditional discards for a
> > long time; the previous patch added that capability to i965.
> >
> > i965 (Haswell) shader-db stats:
> >
> > Without NIR:
> > total instructions in shared programs: 5792133 -> 5776360 (-0.27%)
> > instructions in affected programs:     737585 -> 721812 (-2.14%)
> > helped:                                6300
> > HURT:                                  68
> > GAINED:                                2
> >
> > With NIR:
> > total instructions in shared programs: 5787538 -> 5769569 (-0.31%)
> > instructions in affected programs:     767843 -> 749874 (-2.34%)
> > helped:                                6522
> > HURT:                                  35
> > GAINED:                                6
> >
> 
> What all do you have in that branch?  Last I checked (10 minutes ago), NIR
> wasn't beating GLSL IR yet.
> --Jason

Weird - 5769569 < 5776360, so it sure looks like NIR is better.  But
this is just on master (discards-v2 of my tree).
-------------- 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/20150224/795e767c/attachment.sig>


More information about the mesa-dev mailing list