aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2019-04-19 14:26:42 -0700
committerEric Anholt <[email protected]>2019-04-26 12:42:30 -0700
commitd8486c2ad71a20874043419a6156e1bd4bbb4c83 (patch)
treee6836f2aff43b3c42da714328578735a19bd3767 /src
parent24587ae8ae979de759cff697df9b6652eb75e3da (diff)
v3d: Use _mesa_hash_table_remove_key() where appropriate.
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/v3d/v3d_job.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/src/gallium/drivers/v3d/v3d_job.c b/src/gallium/drivers/v3d/v3d_job.c
index 87eede2cd9c..73546adfc66 100644
--- a/src/gallium/drivers/v3d/v3d_job.c
+++ b/src/gallium/drivers/v3d/v3d_job.c
@@ -38,13 +38,6 @@
#include "broadcom/clif/clif_dump.h"
static void
-remove_from_ht(struct hash_table *ht, void *key)
-{
- struct hash_entry *entry = _mesa_hash_table_search(ht, key);
- _mesa_hash_table_remove(ht, entry);
-}
-
-static void
v3d_job_free(struct v3d_context *v3d, struct v3d_job *job)
{
set_foreach(job->bos, entry) {
@@ -52,29 +45,31 @@ v3d_job_free(struct v3d_context *v3d, struct v3d_job *job)
v3d_bo_unreference(&bo);
}
- remove_from_ht(v3d->jobs, &job->key);
+ _mesa_hash_table_remove_key(v3d->jobs, &job->key);
if (job->write_prscs) {
set_foreach(job->write_prscs, entry) {
const struct pipe_resource *prsc = entry->key;
- remove_from_ht(v3d->write_jobs, (void *)prsc);
+ _mesa_hash_table_remove_key(v3d->write_jobs, prsc);
}
}
for (int i = 0; i < V3D_MAX_DRAW_BUFFERS; i++) {
if (job->cbufs[i]) {
- remove_from_ht(v3d->write_jobs, job->cbufs[i]->texture);
+ _mesa_hash_table_remove_key(v3d->write_jobs,
+ job->cbufs[i]->texture);
pipe_surface_reference(&job->cbufs[i], NULL);
}
}
if (job->zsbuf) {
struct v3d_resource *rsc = v3d_resource(job->zsbuf->texture);
if (rsc->separate_stencil)
- remove_from_ht(v3d->write_jobs,
- &rsc->separate_stencil->base);
+ _mesa_hash_table_remove_key(v3d->write_jobs,
+ &rsc->separate_stencil->base);
- remove_from_ht(v3d->write_jobs, job->zsbuf->texture);
+ _mesa_hash_table_remove_key(v3d->write_jobs,
+ job->zsbuf->texture);
pipe_surface_reference(&job->zsbuf, NULL);
}