v3dv: 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: 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
d8793e3874
commit
8a1b1d8bd5
@@ -282,10 +282,10 @@ v3dv_meta_clear_init(struct v3dv_device *device)
|
||||
{
|
||||
if (device->instance->meta_cache_enabled) {
|
||||
device->meta.color_clear.cache =
|
||||
_mesa_hash_table_create(NULL, u64_hash, u64_compare);
|
||||
_mesa_hash_table_create(NULL, _mesa_hash_u64, _mesa_key_u64_equal);
|
||||
|
||||
device->meta.depth_clear.cache =
|
||||
_mesa_hash_table_create(NULL, u64_hash, u64_compare);
|
||||
_mesa_hash_table_create(NULL, _mesa_hash_u64, _mesa_key_u64_equal);
|
||||
}
|
||||
|
||||
create_color_clear_pipeline_layout(device,
|
||||
|
||||
@@ -2599,18 +2599,6 @@ v3dv_flag_oom(struct v3dv_cmd_buffer *cmd_buffer, struct v3dv_job *job)
|
||||
return; \
|
||||
} while(0) \
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
/* v3d_macros from common requires v3dX and V3DX definitions. Below we need to
|
||||
* define v3dX for each version supported, because when we compile code that
|
||||
* is not version-specific, all version-specific macros need to be already
|
||||
|
||||
Reference in New Issue
Block a user