On 2018-01-15 04:31:42, Tapani Pälli wrote:
> Signed-off-by: Tapani Pälli <tapani.pa...@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

Arguably, if we don't want to enable the shader cache in i965, then we
probably wouldn't want to enable EGL_ANDROID_blob_cache that hits the
same paths.

Since the 18.0 branch is happening soon, two questions arise:

1. Should we enable the shader cache on i965 by default in the 18.0
   release.

2. If not, should we enable it on master after the 18.0 branch.

I guess if neither of these are yes, we could discuss whether it is
okay to enable this Android feature even though we don't want to
enable the shader cache on i965.

>     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

This just allows someone to force the cache feature off. This should
be safe, so I think we should leave it.

-Jordan

>     /* Determine path for cache based on the first defined name as follows:
>      *
> -- 
> 2.14.3
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to