summaryrefslogtreecommitdiff
path: root/src/util/set.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/set.c')
-rw-r--r--src/util/set.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/util/set.c b/src/util/set.c
index fe5b10f0fee..18f1262e3f5 100644
--- a/src/util/set.c
+++ b/src/util/set.c
@@ -36,6 +36,7 @@
#include <assert.h>
#include <string.h>
+#include "hash_table.h"
#include "macros.h"
#include "ralloc.h"
#include "set.h"
@@ -437,3 +438,13 @@ _mesa_set_random_entry(struct set *ht,
return NULL;
}
+
+/**
+ * Helper to create a set with pointer keys.
+ */
+struct set *
+_mesa_pointer_set_create(void *mem_ctx)
+{
+ return _mesa_set_create(mem_ctx, _mesa_hash_pointer,
+ _mesa_key_pointer_equal);
+}