From fdace1c6fa888b1e43b91d730a194df231cbd42b Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Fri, 18 Jul 2025 10:39:21 +0200 Subject: [PATCH] freedreno/rddecompiler: Make use of hash table helpers There is no need to have an own copy Signed-off-by: Christian Gmeiner Reviewed-by: Karmjit Mahil Reviewed-by: Jose Maria Casanova Crespo Part-of: --- src/freedreno/decode/rddecompiler.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/src/freedreno/decode/rddecompiler.c b/src/freedreno/decode/rddecompiler.c index afefe49bb47..f8d765bd7ae 100644 --- a/src/freedreno/decode/rddecompiler.c +++ b/src/freedreno/decode/rddecompiler.c @@ -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;