[Mesa-dev] [RFC 00/20] shader compiler cache

Tapani Pälli tapani.palli at intel.com
Wed Jun 11 22:26:04 PDT 2014


On 06/02/2014 03:05 PM, Tapani Pälli wrote:
> Hello;
> This series provides a disk cache for the shader compiler and is used 
> to 'skip glLinkProgram' like GL_ARB_get_program_binary does but under 
> the hood without api for the client.
> With the series I get 50% improvement for L4D2 startup (goes down from 
> 30s to ~15s) This is the time after startup video to menu screen. With 
> some other apps the improvement varies a lot (as example I measured 
> ~10% improvement with GLBenchmark 2.7). It would be nice to get some 
> more test results, especially with modern games.

Turns out these measurements were not correct, sorry for that. I've made
2 major mistakes when taking the measurements. First of all, I was using
a debug build which makes a radical difference, this happened because
I've automated too many things (mesa config+build+installation) and
therefore have not checked my configure flags properly while running the
measurements. Secondly, I did not force kernel disk cache to be dropped
between the runs which has also big effect. Is is also important to
understand that there is a lot of variety also between systems with
different CPU and disk configurations (HDD/SSD) so any absolute results
cannot be given.

I took new ones with 2 different setups, using release builds and
dropping disk cache before test runs. I can see from ~17% to ~32%
improvement depending on the system. So the result really varies quite a
lot and is dangerous to state any absolute value. Also with the fixes
that I did for Gallium the total goes down a bit (around 5%) but I plan
to work that back if possible. I did not realize before that mesa and
gallium have different 'get_mesa_program' with different contents, this
matters quite a lot and it might be that eventually I need to add driver
API to call different functionality depending on the driver to make
things work.

Many thanks to Benjamin And Thomas (CC) for helping me out fixing issues
with Gallium drivers and fixing my measurement methodologies!

// Tapani

More information about the mesa-dev mailing list