Mesa Shader Cache Environment Variable Controls Renamed

Written by Michael Larabel in Mesa on 17 March 2022 at 08:41 AM EDT. 3 Comments
As a public service announcement for those using the "MESA_GLSL_CACHE" environment variable for controlling where your graphics driver shader cache resides or using "MESA_GLSL_CACHE_DISABLE" for forcing off this on-disk shader cache, the environment variables have been renamed.

If you are relying upon the MESA_GLSL_CACHE environment variables, they have been renamed to be more appropriate. Juan Suárez of Igalia led the change since these environment variables are used not only for OpenGL shading language (GLSL) but also SPIR-V shaders and cached Vulkan pipelines by Mesa drivers. With being used for more than just "GLSL", the environment variables aren't accurate.

So with the latest Mesa 22.1 development code, MESA_GLSL_CACHE has been renamed to MESA_SHADER_CACHE so it's more representative of the multiple formats/uses. Likewise, MESA_GLSL_CACHE_DISABLE is now MESA_SHADER_CACHE_DISABLE and MESA_GLSL_CACHE_MAX_SIZE is renamed to MESA_SHADER_CACHE_MAX_SIZE.

The MR changing these environment variable controls does at least add warnings for now if those former environment variables are set. In any event, if using MESA_GLSL_CACHE* environment variables, be sure now moving forward to update them to MESA_SHADER_CACHE* so they will take affect for controlling Mesa's on-disk shader cache.
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