Mesa Preps For Landing The On-Disk Shader Cache
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.