diff options
Diffstat (limited to 'src/gallium/auxiliary/cso_cache/cso_cache.c')
-rw-r--r-- | src/gallium/auxiliary/cso_cache/cso_cache.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_cache.c b/src/gallium/auxiliary/cso_cache/cso_cache.c index 232fa9ec..0bd124e6 100644 --- a/src/gallium/auxiliary/cso_cache/cso_cache.c +++ b/src/gallium/auxiliary/cso_cache/cso_cache.c @@ -54,8 +54,10 @@ static unsigned hash_key(const void *key, unsigned key_size) /* I'm sure this can be improved on: */ - for (i = 0; i < key_size/4; i++) + for (i = 0; i < key_size/4; i++) { + hash = (hash << 7) | (hash >> 25); hash ^= ikey[i]; + } return hash; } |