Mesa's Lima Driver Finally Implements OpenGL Shader Cache Support
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.
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.
7 Comments