Mesa Preps For Landing The On-Disk Shader Cache

Written by Michael Larabel in Mesa on 27 September 2016 at 07:55 PM EDT. 19 Comments
MESA
Just a few days ago was the fifth version of the proposed Mesa on-disk shader cache and it's looking like it may finally be ready for merging with some of the prep infrastructure work having landed today in mainline Mesa.

For those behind on their Phoronix reading and are unfamiliar with on-disk shader caches, it's about caching compiled shaders to the disk. This avoids having to recompile shaders frequently, which can be a big deal for some games. With games like Shadow of Mordor and Unreal Engine 4 this can lead to a smoother gaming experience.

The work so far for this Mesa on-disk shader cache is just for the i965 Intel driver support but hopefully in the not too distant future can be supported by other Mesa/Gallium3D drivers.

What landed today were the initial functions for implementing an on-disk cache of objects. Objects are handled using a 20-byte sequence, which can be like a SHA1 hash of the contents, and supporting a MESA_GLSL_CACHE_DIR environment variable. The default limit for this new Mesa GLSL cache directory is 1GB. More details on this prep work via this commit with hopefully the rest of the enablement not being too far behind.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com 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 OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week