diff options
author | Carl Worth <[email protected]> | 2015-03-16 11:46:20 -0700 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-01-31 09:51:30 +1100 |
commit | 0f60c6616e93cba72bff4fbfedb72a753ef78e05 (patch) | |
tree | 2f0bfc25c096c1f1d96637cec15647b0e00fd023 /src/util/disk_cache.c | |
parent | 0ecd426490b043aac6a5db0a6e0feaa39f6d9c54 (diff) |
glsl: Switch to disable-by-default for the GLSL shader cache
The shader cache is expected to be developed incrementally over a
fairly long series of commits. For that period of instability, we
require users to opt into the shader cache by setting:
MESA_GLSL_CACHE_ENABLE=1
In the future, when the shader cache is complete, we can revert this
commit so that the cache will be on by default.
The user can always disable the cache with
MESA_GLSL_CACHE_DISABLE=1. That functionality is not affected by this
commit, (nor will it be affected by the future revert).
Reviewed-by: Eric Anholt <[email protected]>
Diffstat (limited to 'src/util/disk_cache.c')
-rw-r--r-- | src/util/disk_cache.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c index 6de608c2e4a..551ceebd3b8 100644 --- a/src/util/disk_cache.c +++ b/src/util/disk_cache.c @@ -151,6 +151,13 @@ disk_cache_create(void) if (getenv("MESA_GLSL_CACHE_DISABLE")) goto fail; + /* As a temporary measure, (while the shader cache is under + * development, and known to not be fully functional), also require + * the MESA_GLSL_CACHE_ENABLE variable to be set. + */ + if (!getenv("MESA_GLSL_CACHE_ENABLE")) + goto fail; + /* Determine path for cache based on the first defined name as follows: * * $MESA_GLSL_CACHE_DIR |