Mesa's Lima Driver Finally Implements OpenGL Shader Cache Support

Written by Michael Larabel in Mesa on 17 January 2021 at 12:21 AM EST. 7 Comments
While Mesa's Panfrost Gallium3D driver has been working out well for modern ARM Mali open-source graphics support, for the old Mali 400/450 series hardware there still is the "Lima" driver within Mesa that doesn't receive too much attention these days (just around 70 commits over the past year) but as its first work of 2021 saw an initial shader cache implementation.

The Lima Gallium3D driver now supports on-disk shader cache functionality for OpenGL fragment and vertex shaders. Like with the other OpenGL drivers providing on-disk shader caching, it's for speeding up subsequent game/application load times and for helping with performance for any software that is otherwise trying to compile shaders on the fly.

Independent developer Erico Nunes who implemented the Gallium3D shader cache support for Lima noted, "Some opengl features require shader recompilation to be implemented in the mali400 and can only be detected at draw time. In some applications, this could lead to recompiling shaders on every frame which could kill performance. Introduce a shader cache to prevent this issue. lima didn't have vertex shader recompilation yet but it is needed to implement followup features, so include it here too. Code heavily borrowed from the vc4 shader cache implementation."

The code landed with this commit for Mesa 21.1 due out next quarter.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week