From: Eric Anholt Date: Thu, 1 Nov 2018 19:22:05 +0000 (-0700) Subject: v3d: Take advantage of _mesa_hash_table_remove_key() in the simulator. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3923cf626d4c426f885edbadbc28944d1a1a4ebc;p=mesa.git v3d: Take advantage of _mesa_hash_table_remove_key() in the simulator. --- diff --git a/src/gallium/drivers/v3d/v3d_simulator.c b/src/gallium/drivers/v3d/v3d_simulator.c index a9ff0f4a91c..e24b8887ae2 100644 --- a/src/gallium/drivers/v3d/v3d_simulator.c +++ b/src/gallium/drivers/v3d/v3d_simulator.c @@ -202,10 +202,8 @@ v3d_free_simulator_bo(struct v3d_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);