freedreno/rddecompiler: Make use of hash table helpers
There is no need to have an own copy Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Karmjit Mahil <karmjit.mahil@igalia.com> Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36218>
This commit is contained in:
committed by
Marge Bot
parent
8a1b1d8bd5
commit
fdace1c6fa
@@ -555,18 +555,6 @@ emit_header()
|
||||
dev_id.gpu_id, dev_id.chip_id);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
u64_hash(const void *key)
|
||||
{
|
||||
return _mesa_hash_data(key, sizeof(uint64_t));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
u64_compare(const void *key1, const void *key2)
|
||||
{
|
||||
return memcmp(key1, key2, sizeof(uint64_t)) == 0;
|
||||
}
|
||||
|
||||
static int
|
||||
handle_file(const char *filename, uint32_t submit_to_decompile)
|
||||
{
|
||||
@@ -587,7 +575,7 @@ handle_file(const char *filename, uint32_t submit_to_decompile)
|
||||
|
||||
type0_reg = reg_a6xx;
|
||||
mem_ctx = ralloc_context(NULL);
|
||||
_mesa_set_init(&decompiled_shaders, mem_ctx, u64_hash, u64_compare);
|
||||
_mesa_set_init(&decompiled_shaders, mem_ctx, _mesa_hash_u64, _mesa_key_u64_equal);
|
||||
|
||||
struct {
|
||||
unsigned int len;
|
||||
|
||||
Reference in New Issue
Block a user