Skip to content

disk_cache: build option for disabled-by-default

John Bates requested to merge jbates/mesa:shader-default-build into master

On some systems it is problematic to have the shader cache enabled by default. This adds a build option to support the disk cache but keep it disabled unless the environment variable MESA_GLSL_CACHE_DISABLE=false.

For example, on Chrome OS, Chrome already has it's own shader disk cache implementation so it disables the mesa feature. Tests do not want the shader disk cache enabled because it can cause inconsistent performance results and the default 1GB for the disk cache could lead to problems that require more effort to work around. The Mesa shader disk cache is useful for VMs though, where it is easy to configure the feature with environment variables. With the current version of Mesa, Chrome OS would need to have a system-wide environment variable to disable the disk cache everywhere except where needed. More elegant to just build Mesa with the cache feature disabled by default.

Edited by John Bates

Merge request reports