summaryrefslogtreecommitdiff
path: root/src/mesa/shader/hash_table.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/hash_table.h')
-rw-r--r--src/mesa/shader/hash_table.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/mesa/shader/hash_table.h b/src/mesa/shader/hash_table.h
index 881e756f08..0552691464 100644
--- a/src/mesa/shader/hash_table.h
+++ b/src/mesa/shader/hash_table.h
@@ -118,6 +118,30 @@ extern unsigned hash_table_string_hash(const void *key);
*/
#define hash_table_string_compare ((hash_compare_func_t) strcmp)
+
+/**
+ * Compute hash value of a pointer
+ *
+ * \param key Pointer to be used as a hash key
+ *
+ * \note
+ * The memory pointed to by \c key is \b never accessed. The value of \c key
+ * itself is used as the hash key
+ *
+ * \sa hash_table_pointer_compare
+ */
+unsigned
+hash_table_pointer_hash(const void *key);
+
+
+/**
+ * Compare two pointers used as keys
+ *
+ * \sa hash_table_pointer_hash
+ */
+int
+hash_table_pointer_compare(const void *key1, const void *key2);
+
#ifdef __cplusplus
};
#endif