Intel's Mesa GLSL Shader Cache Is Speeding Up Game Load Times

Written by Michael Larabel in Linux Gaming on 16 November 2017 at 11:24 AM EST. Page 1 of 3. 7 Comments.

At the start of the month the Intel i965 Mesa driver finally landed its on-disk shader cache, months after the GLSL on-disk shader cache originally landed in core Mesa and wired up for the RadeonSI Gallium3D driver. While you can't play too many shader-heavy games with current Intel integrated graphics, this GLSL shader cache within Mesa 17.4-dev Git is working well for speeding up load times and does provide some frame-rate benefits in games dynamically loading shaders.

As it stands now within Mesa Git, the Intel GLSL shader cache is disabled by default (unlike the RadeonSI cache being enabled by default). With Mesa 17.4-dev Git as of this month, you just need the MESA_GLSL_CACHE_DISABLE=0 environment variable set to make use of the cache... Of course, on the first run of games/applications you will not notice any benefit as first the shader cache needs to be populated.

With an Intel Core i7 8700K system with UHD Graphics 630 on Ubuntu 17.10 and running with 4.15 DRM-Next and Mesa 17.4 Git via the Padoka PPA, I ran some comparison benchmarks with/without this Intel GLSL cache. When testing the GLSL shader cache, it was done after the cache was warm -- i.e. all the games ran first in order to spin up the cache, plus the Phoronix Test Suite running each test a minimum of three times.

All tests were done via the Phoronix Test Suite. With the Phoronix Test Suite fully automating the processes, it's also possible to compare the before/after times for seeing how the shader cache impacts load times. That can be done automatically by simply setting the RUN_TIMES_ARE_A_BENCHMARK=1 environment variable prior to running any Phoronix Test Suite tests.


Related Articles