[Mesa-dev] [PATCH] glsl/opt_algebraic: recognize lrp pattern

Jordan Justen jljusten at gmail.com
Fri Nov 15 20:33:20 PST 2013

On Fri, Nov 15, 2013 at 7:47 PM, Eric Anholt <eric at anholt.net> wrote:
> Jordan Justen <jordan.l.justen at intel.com> writes:
>> This algebraic optimization recognizes an series of adds and
>> multiplies with a particular pattern within the ir which is
>> equivalent to a lrp.
>> shader-db results:
>> total instructions in shared programs: 1729161 -> 1718321 (-0.63%)
>> instructions in affected programs:     743700 -> 732860 (-1.46%)
>> GAINED:                                4
>> LOST:                                  41
> Your testing matches mine: No performance difference on dota2, n=10.
> I do need to figure out how to automate the testing, though.  I'd like
> to be able to take more samples without manually doing up-arrow/enter in
> the game's console.

Yeah, I tried getting a script together to launch dota2 and run the
benchmark like we can with tf2. It seems some of the command line
parameters got messed up by the app.

Regarding my shader-db numbers above, I think they were stale. I
re-ran things just before sending it out, and I think I saw that the
percentages were the same, so I didn't look closely at the GAINED/LOST

But, at the time of posting, I think they actually were:
GAINED:                                4
LOST:                                  17

I rebased the change to master yesterday, and now with the latest
shader-db/run.py change (and *no changes* to the opt-pass), I'm
total instructions in shared programs: 1654204 -> 1643313 (-0.66%)
instructions in affected programs:     692919 -> 682028 (-1.57%)
GAINED:                                9
LOST:                                  6

Still trying to debug the lost cases. All the gained are tf2-low, and
all the lost are in l4d2.


More information about the mesa-dev mailing list