[Mesa-dev] A few NIR compile time optimisations

Timothy Arceri tarceri at itsqueeze.com
Wed Feb 13 09:47:15 UTC 2019


On 13/2/19 8:38 pm, Timothy Arceri wrote:
> On 13/2/19 8:26 pm, Connor Abbott wrote:
>> Reviewed-by: Connor Abbott <cwabbott0 at gmail.com 
>> <mailto:cwabbott0 at gmail.com>>
>>
>> I'm a bit surprised it's that slow... do you have any idea what's 
>> going on? I've made flamegraphs in the past on i965 to see where most 
>> of the time is spent.
> 
> Some shaders are actually faster, but things like the Deus Ex shaders 
> (and looks like especially the dolphin uber shaders are slower).
> 
> With the  Deus Ex shaders I was looking at we spend 20% in opt_algebraic 
> and before this series 7.2% in nir_opt_cse (after this series 4.9%). The 
> shaders have lots of operations converting vales to different type etc.

If you are interested you can use this [1] shader-db patch to find 
problem shaders.

Note: The compile times returned from that patch seem to work most of 
the time but occasionally it returns negative times so I've obviously 
got a bug in there somewhere.

[1] https://paste.fedoraproject.org/paste/WR2mziu3dna0THjneSbuTw


> 
>>
>> On Wed, Feb 13, 2019 at 9:00 AM Timothy Arceri <tarceri at itsqueeze.com 
>> <mailto:tarceri at itsqueeze.com>> wrote:
>>
>>     Currently the radeonsi NIR backend takes around twice the time
>>     of the tgsi backend to compile shader-db. These are some first
>>     steps at reducing the overhead of NIR.
>>
>>     This series reduces the compile time of a Deus Ex program I was
>>     profiling by around 5%.
>>
>>
>>     _______________________________________________
>>     mesa-dev mailing list
>>     mesa-dev at lists.freedesktop.org 
>> <mailto:mesa-dev at lists.freedesktop.org>
>>     https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list