diff options
-rw-r--r-- | src/util/hash_table.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/hash_table.h b/src/util/hash_table.h index b35ee871bb3..c7f577665dc 100644 --- a/src/util/hash_table.h +++ b/src/util/hash_table.h @@ -105,7 +105,8 @@ static inline uint32_t _mesa_key_hash_string(const void *key) static inline uint32_t _mesa_hash_pointer(const void *pointer) { - return _mesa_hash_data(&pointer, sizeof(pointer)); + uintptr_t num = (uintptr_t) pointer; + return (uint32_t) ((num >> 2) ^ (num >> 6) ^ (num >> 10) ^ (num >> 14)); } enum { |