glsl, st/shader_cache: check the whole sha1 for zero
authorGrazvydas Ignotas <notasas@gmail.com>
Sun, 26 Mar 2017 16:30:23 +0000 (19:30 +0300)
committerTimothy Arceri <tarceri@itsqueeze.com>
Mon, 27 Mar 2017 04:05:10 +0000 (15:05 +1100)
commitb97faea162fe9999d241de679f99ad935a8bce26
tree9eb7ed304a4d3923072ef59d3f8c81f8ad275e7b
parentf2d4d116113c8eddf7e8f372d466510c31d3dba4
glsl, st/shader_cache: check the whole sha1 for zero

The checks were only looking at the first byte, while the intention
seems to be to check if the whole sha1 is zero. This prevented all
shaders with first byte zero in their sha1 from being saved.

This shaves around a second from Deus Ex load time on a hot cache.

Signed-off-by: Grazvydas Ignotas <notasas@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net>
src/compiler/glsl/shader_cache.cpp
src/mesa/state_tracker/st_shader_cache.c