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

Matt Turner mattst88 at gmail.com
Tue Feb 24 08:39:18 PST 2015


On Tue, Feb 24, 2015 at 7:53 AM, Jason Ekstrand <jason at jlekstrand.net> 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

I think you misread. Those stats are just for this patch, and they
show NIR generating more instructions than non-NIR.


More information about the mesa-dev mailing list