summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <alyssa@rosenzweig.io>2024-03-07 16:41:03 -0400
committerMarge Bot <emma+marge@anholt.net>2024-03-12 19:41:49 +0000
commitc29110ef99e1a8ad892ee23110c671a6820e48d9 (patch)
tree7e5168c39e0a6f63d5dc0b3b41e54de5857e9f41
parent2d32239b7a682919b2d9b8b2bbd4c396564ab5c3 (diff)
v3d: derive ht
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28056>
-rw-r--r--src/gallium/drivers/v3d/v3d_job.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/gallium/drivers/v3d/v3d_job.c b/src/gallium/drivers/v3d/v3d_job.c
index 65dc13733d9..aceb6580394 100644
--- a/src/gallium/drivers/v3d/v3d_job.c
+++ b/src/gallium/drivers/v3d/v3d_job.c
@@ -613,24 +613,12 @@ done:
v3d_job_free(v3d, job);
}
-static bool
-v3d_job_compare(const void *a, const void *b)
-{
- return memcmp(a, b, sizeof(struct v3d_job_key)) == 0;
-}
-
-static uint32_t
-v3d_job_hash(const void *key)
-{
- return _mesa_hash_data(key, sizeof(struct v3d_job_key));
-}
+DERIVE_HASH_TABLE(v3d_job_key);
void
v3d_job_init(struct v3d_context *v3d)
{
- v3d->jobs = _mesa_hash_table_create(v3d,
- v3d_job_hash,
- v3d_job_compare);
+ v3d->jobs = v3d_job_key_table_create(v3d);
v3d->write_jobs = _mesa_hash_table_create(v3d,
_mesa_hash_pointer,
_mesa_key_pointer_equal);