gallium/cso: use a different hash function

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Chia-I Wu <olvaffe@gmail.com>
macos/master
Gert Wollny 4 years ago
parent 00093d0a8e
commit 2b0e2f0729
  1. 4
      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: /* 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]; hash ^= ikey[i];
}
return hash; return hash;
} }

Loading…
Cancel
Save