diff options
author | Eric Anholt <[email protected]> | 2019-04-19 14:28:40 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-04-26 12:42:30 -0700 |
commit | c74d0e7f6278b885b6b195b8e8daef36c775d4ec (patch) | |
tree | 06bd299e34cf96794a3cc2f537c515e040b891ae /src | |
parent | d8486c2ad71a20874043419a6156e1bd4bbb4c83 (diff) |
vc4: Use _mesa_hash_table_remove_key() where appropriate.
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_job.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/gallium/drivers/vc4/vc4_job.c b/src/gallium/drivers/vc4/vc4_job.c index 2b87a00df0f..30dfebdb8c2 100644 --- a/src/gallium/drivers/vc4/vc4_job.c +++ b/src/gallium/drivers/vc4/vc4_job.c @@ -32,13 +32,6 @@ #include "util/hash_table.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 vc4_job_free(struct vc4_context *vc4, struct vc4_job *job) { struct vc4_bo **referenced_bos = job->bo_pointers.base; @@ -46,22 +39,26 @@ vc4_job_free(struct vc4_context *vc4, struct vc4_job *job) vc4_bo_unreference(&referenced_bos[i]); } - remove_from_ht(vc4->jobs, &job->key); + _mesa_hash_table_remove_key(vc4->jobs, &job->key); if (job->color_write) { - remove_from_ht(vc4->write_jobs, job->color_write->texture); + _mesa_hash_table_remove_key(vc4->write_jobs, + job->color_write->texture); pipe_surface_reference(&job->color_write, NULL); } if (job->msaa_color_write) { - remove_from_ht(vc4->write_jobs, job->msaa_color_write->texture); + _mesa_hash_table_remove_key(vc4->write_jobs, + job->msaa_color_write->texture); pipe_surface_reference(&job->msaa_color_write, NULL); } if (job->zs_write) { - remove_from_ht(vc4->write_jobs, job->zs_write->texture); + _mesa_hash_table_remove_key(vc4->write_jobs, + job->zs_write->texture); pipe_surface_reference(&job->zs_write, NULL); } if (job->msaa_zs_write) { - remove_from_ht(vc4->write_jobs, job->msaa_zs_write->texture); + _mesa_hash_table_remove_key(vc4->write_jobs, + job->msaa_zs_write->texture); pipe_surface_reference(&job->msaa_zs_write, NULL); } |