glsl: add initial implementation of shader cache

Graphics / Mesa 3D Graphics Library / Mesa - Timothy Arceri [collabora.com] - 16 February 2017 19:18 EST

This uses disk_cache.c to write out a serialization of various state that's required in order to successfully load and use a binary written out by a drivers backend, this state is referred to as "metadata" throughout the implementation.

This initial version is intended to work with all stages beside compute.

This patch is based on the initial work done by Carl.

V2: extend the file's doxygen comment to cover some of the design decisions.

V3:- skip cache for fixed function shaders- add int64 support- fix glsl IR program parameter caching/restore and cache the parameter values which are used by gallium backends.- use new link status enum

V4:- add compute program support

34ca0fc glsl: add initial implementation of shader cache
src/compiler/Makefile.glsl.am | 3 +-
src/compiler/Makefile.sources | 4 +
src/compiler/glsl/shader_cache.cpp | 589 +++++++++++++++++++++++++++++++++++++
src/compiler/glsl/shader_cache.h | 38 +++
4 files changed, 633 insertions(+), 1 deletion(-)

Upstream: cgit.freedesktop.org


  • Share