diff options
Diffstat (limited to 'lib/mesa/src/util/set.c')
-rw-r--r-- | lib/mesa/src/util/set.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/lib/mesa/src/util/set.c b/lib/mesa/src/util/set.c index fe5b10f0f..18f1262e3 100644 --- a/lib/mesa/src/util/set.c +++ b/lib/mesa/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); +} |