util/disk_cache: use a helper to compute cache keys
authorGrazvydas Ignotas <notasas@gmail.com>
Wed, 15 Mar 2017 23:09:27 +0000 (01:09 +0200)
committerTimothy Arceri <tarceri@itsqueeze.com>
Tue, 21 Mar 2017 00:15:52 +0000 (11:15 +1100)
commit529a767041c880f90c4465cb34a89430459c7fce
treeb19c1fcbc36ffe1314155559c7fa52226c8c6e2d
parent021c87fa24afe849e51dd0249ec8e7b59e097062
util/disk_cache: use a helper to compute cache keys

This will allow to hash additional data into the cache keys or even
change the hashing algorithm easily, should we decide to do so.

v2: don't try to compute key (and crash) if cache is disabled

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
src/compiler/glsl/glsl_parser_extras.cpp
src/compiler/glsl/shader_cache.cpp
src/compiler/glsl/tests/cache_test.c
src/gallium/drivers/radeonsi/si_state_shaders.c
src/mesa/state_tracker/st_shader_cache.c
src/util/disk_cache.c
src/util/disk_cache.h