[Mesa-dev] [PATCH 6/7] android: ignore MESA_GLSL_CACHE_DISABLE setting
Tapani Pälli
tapani.palli at intel.com
Mon Jan 15 12:31:42 UTC 2018
Signed-off-by: Tapani Pälli <tapani.palli at intel.com>
---
src/mesa/drivers/dri/i965/brw_disk_cache.c | 2 ++
src/util/disk_cache.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/brw_disk_cache.c b/src/mesa/drivers/dri/i965/brw_disk_cache.c
index 65bb52726e..4df4504666 100644
--- a/src/mesa/drivers/dri/i965/brw_disk_cache.c
+++ b/src/mesa/drivers/dri/i965/brw_disk_cache.c
@@ -405,8 +405,10 @@ void
brw_disk_cache_init(struct brw_context *brw)
{
#ifdef ENABLE_SHADER_CACHE
+#ifndef ANDROID
if (env_var_as_boolean("MESA_GLSL_CACHE_DISABLE", true))
return;
+#endif
char renderer[10];
MAYBE_UNUSED int len = snprintf(renderer, sizeof(renderer), "i965_%04x",
diff --git a/src/util/disk_cache.c b/src/util/disk_cache.c
index d7891e3b70..3c98089e69 100644
--- a/src/util/disk_cache.c
+++ b/src/util/disk_cache.c
@@ -208,9 +208,11 @@ disk_cache_create(const char *gpu_name, const char *timestamp,
if (local == NULL)
goto fail;
+#ifndef ANDROID
/* At user request, disable shader cache entirely. */
if (env_var_as_boolean("MESA_GLSL_CACHE_DISABLE", false))
goto fail;
+#endif
/* Determine path for cache based on the first defined name as follows:
*
--
2.14.3
More information about the mesa-dev
mailing list