summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-11-02 11:57:14 -0700
committerEric Anholt <[email protected]>2018-11-02 14:26:38 -0700
commit645ca269d247c471d54d7a54a7fe1bbc2296d789 (patch)
tree254a252e355a063da98be0cb8070f12352ca4c4d
parentf32ba7abd774a0b09805da582a97e1a1eb5efd75 (diff)
vc4: Take advantage of _mesa_hash_table_remove_key() in the simulator.
-rw-r--r--src/gallium/drivers/vc4/vc4_simulator.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/drivers/vc4/vc4_simulator.c b/src/gallium/drivers/vc4/vc4_simulator.c
index 71ac664895b..53f1fc5ba7e 100644
--- a/src/gallium/drivers/vc4/vc4_simulator.c
+++ b/src/gallium/drivers/vc4/vc4_simulator.c
@@ -173,10 +173,8 @@ vc4_free_simulator_bo(struct vc4_simulator_bo *sim_bo)
mtx_lock(&sim_state.mutex);
u_mmFreeMem(sim_bo->block);
if (sim_bo->handle) {
- struct hash_entry *entry =
- _mesa_hash_table_search(sim_file->bo_map,
- int_to_key(sim_bo->handle));
- _mesa_hash_table_remove(sim_file->bo_map, entry);
+ _mesa_hash_table_remove_key(sim_file->bo_map,
+ int_to_key(sim_bo->handle));
}
mtx_unlock(&sim_state.mutex);
ralloc_free(sim_bo);