glsl: Switch to disable-by-default for the GLSL shader cache
[mesa.git] / src / util / disk_cache.c
index 6de608c2e4a0ee6e80bfcf773caf29b6f45c5697..551ceebd3b89ee3c7de2f4fcdc791d075fbc1ec0 100644 (file)
@@ -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