Hi; This series enables EGL_ANDROID_blob_cache extension. Overall approach is to skip linking of shader programs by utilizing functionality of ARB_get_program_binary extension.
2 first patches are separate and could be pushed in, rest is RFC and last patch is additional debug patch that makes Mesa use this cache for all EGL apps. With the last patch I've verified functionality on desktop using following apps: glmark2-es, Synmark, glbenchmark2.7.0 (could not make new gfxbench versions work with EGL ..) and a 3rd party OpenGL ES 2.0 game engine that has relatively complex shaders. *BUT* there are big issues when using this on Android. Main issue is that textures are missing from some of the hwui (library used to render android ui elements) programs. I'm continuing to debug this but wanted to share to approach and see if someone might spot issues with the implementation. Any comments appreciated, thanks! Tapani Pälli (10): glsl: cleanup shader_cache header guard android: disable disk cache on Android dri: add interface for EGL_ANDROID_blob_cache extension glsl: add function to create unique string from shader program mesa: add set and get functions to gl_context glsl: create shader sha1 if disk cache or blob cache is active mesa: add program blob cache functionality egl: add support for EGL_ANDROID_blob_cache i965: add __DRI2_BLOB support and set cache functions egl: XXX debug framework for EGL_ANDROID_blob_cache Android.common.mk | 1 - include/GL/internal/dri_interface.h | 26 +++++- src/compiler/Makefile.sources | 1 + src/compiler/glsl/glsl_parser_extras.cpp | 26 +++--- src/compiler/glsl/meson.build | 1 + src/compiler/glsl/program.cpp | 88 +++++++++++++++++++ src/compiler/glsl/program.h | 12 ++- src/compiler/glsl/shader_cache.cpp | 55 +----------- src/compiler/glsl/shader_cache.h | 6 +- src/egl/drivers/dri2/egl_dri2.c | 40 +++++++++ src/egl/drivers/dri2/egl_dri2.h | 4 + src/egl/main/eglapi.c | 106 +++++++++++++++++++++++ src/egl/main/eglapi.h | 4 + src/egl/main/egldisplay.h | 3 + src/egl/main/eglentrypoint.h | 1 + src/mesa/Makefile.sources | 2 + src/mesa/drivers/dri/i965/intel_screen.c | 18 ++++ src/mesa/main/mtypes.h | 16 ++++ src/mesa/main/program_blob_cache.c | 141 +++++++++++++++++++++++++++++++ src/mesa/main/program_blob_cache.h | 48 +++++++++++ src/mesa/meson.build | 2 + src/mesa/program/ir_to_mesa.cpp | 9 +- src/util/disk_cache.c | 5 +- 23 files changed, 538 insertions(+), 77 deletions(-) create mode 100644 src/compiler/glsl/program.cpp create mode 100644 src/mesa/main/program_blob_cache.c create mode 100644 src/mesa/main/program_blob_cache.h -- 2.14.3 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev