util/disk_cache: allow drivers to pass a directory structure
authorTimothy Arceri <tarceri@itsqueeze.com>
Mon, 6 Feb 2017 01:56:08 +0000 (12:56 +1100)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 17 Feb 2017 00:18:43 +0000 (11:18 +1100)
commit3342ce452cf33dc70ffad03b676579e0631182b3
tree7b58780247b71783890283ef905710efedafc91c
parent87009681a53436700a477c45cb13272fa4a881fd
util/disk_cache: allow drivers to pass a directory structure

In order to avoid costly fallback recompiles when cache items are
created with an old version of Mesa or for a different gpu on the
same system we want to create directories that look like this:

./{TIMESTAMP}_{LLVM_TIMESTAMP}/{GPU_ID}

Note: The disk cache util will take a single timestamp string, it is
up to the backend to concatenate the llvm string with the mesa string
if applicable.

Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/compiler/glsl/tests/cache_test.c
src/util/disk_cache.c
src/util/disk_cache.h