[Mesa-dev] [PATCH 0/7] EGL_ANDROID_blob_cache

Tapani Pälli tapani.palli at intel.com
Mon Jan 15 12:31:36 UTC 2018


Hello;

Here's a refactored series of EGL_ANDROID_blob_cache. Now cache 
functions are stored in disk_cache struct and the functionality 
called within existing disk_cache put/get code. Problems/errors 
that existed with earlier series are gone.

On Android cache index file is created to MESA_GLSL_CACHE_DIR 
and blobs are  generated under '/data/user_de/0' in application 
specific paths:

androidia_64:/ # find /data/user_de/0/ -name *shader*
/data/user_de/0/com.android.settings/code_cache/com.android.opengl.shaders_cache
/data/user_de/0/com.android.gallery3d/code_cache/com.android.opengl.shaders_cache
/data/user_de/0/com.android.systemui/code_cache/com.android.opengl.shaders_cache
/data/user_de/0/com.rovio.angrybirdsspace.ads/code_cache/com.android.opengl.shaders_cache

(this part is managed by Android but may be interesting to know).

Also SurfaceFlinger manages its own cache as seen in the log output:
01-15 07:40:26.329  2129  2129 D SurfaceFlinger: shader cache generated - 24 shaders in 57.687504 ms

I'm not sure if /sdcard is sane default but I've tried everything 
else (/cache, /data/cache) and failed because of permission errors.

Thanks;

Tapani Pälli (7):
  dri: add interface for EGL_ANDROID_blob_cache extension
  egl: add support for EGL_ANDROID_blob_cache
  disk cache: add callback functionality
  disk cache: support setting MESA_GLSL_CACHE_DIR at compile time
  i965: add __DRI2_BLOB support and set cache functions
  android: ignore MESA_GLSL_CACHE_DISABLE setting
  android: set '/sdcard/' as MESA_GLSL_CACHE_DIR by default

 Android.common.mk                          |  1 +
 include/GL/internal/dri_interface.h        | 26 +++++++++++++-
 src/egl/drivers/dri2/egl_dri2.c            | 43 ++++++++++++++++++++++++
 src/egl/drivers/dri2/egl_dri2.h            |  4 +++
 src/egl/main/eglapi.c                      | 29 ++++++++++++++++
 src/egl/main/eglapi.h                      |  4 +++
 src/egl/main/egldisplay.h                  |  3 ++
 src/egl/main/eglentrypoint.h               |  1 +
 src/mesa/drivers/dri/i965/brw_disk_cache.c |  2 ++
 src/mesa/drivers/dri/i965/intel_screen.c   | 21 ++++++++++++
 src/util/disk_cache.c                      | 54 +++++++++++++++++++++++++++++-
 src/util/disk_cache.h                      | 19 +++++++++++
 12 files changed, 205 insertions(+), 2 deletions(-)

-- 
2.14.3



More information about the mesa-dev mailing list