glsl: add initial implementation of shader cache
authorTimothy Arceri <timothy.arceri@collabora.com>
Thu, 14 Apr 2016 01:08:32 +0000 (11:08 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 17 Feb 2017 00:18:42 +0000 (11:18 +1100)
commit34ca0fce228224121d1a3b111c38325e731bace3
treeec7aa9ce593e804f35a75591dda606cd4e604ada
parentb0232d98e9539087522040fd1882304098e0e827
glsl: add initial implementation of shader cache

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

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/compiler/Makefile.glsl.am
src/compiler/Makefile.sources
src/compiler/glsl/shader_cache.cpp [new file with mode: 0644]
src/compiler/glsl/shader_cache.h [new file with mode: 0644]