util: Move the open-addressing linear-probing hash_table to src/util.
authorKenneth Graunke <kenneth@whitecape.org>
Tue, 25 Feb 2014 09:08:45 +0000 (01:08 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 4 Aug 2014 18:07:05 +0000 (11:07 -0700)
commit72e55bb6888ff4d6b69b10d9c58573e4c3d492ec
tree9084fd3c939f545bbc0d6a214564755bca9745cb
parent1e0da6233be6e5fb0143615d5e3d3642ddb7964f
util: Move the open-addressing linear-probing hash_table to src/util.

This hash table is used in core Mesa, the GLSL compiler, and the i965
driver, which makes it a good candidate for the new src/util module.

It's much faster than program/hash_table.[ch] (see commit 6991c2922f5
for data), and José's u_hash_table.c has a comment saying Gallium should
probably consider switching to a linear probing hash table at some point.
So this seems like the best candidate for a shared data structure.

Signed-off-by: Kenneth Graunke <kenneth@whitecape.org>
v2 (Jason Ekstrand): Pick up another hash_table use and patch up scons

Signed-off-by: Jason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
49 files changed:
configure.ac
src/glsl/Makefile.am
src/glsl/SConscript
src/glsl/ir_variable_refcount.cpp
src/glsl/link_uniform_block_active_visitor.h
src/glsl/link_uniform_blocks.cpp
src/glsl/opt_dead_code.cpp
src/mesa/Makefile.sources
src/mesa/drivers/dri/i965/brw_fs.cpp
src/mesa/drivers/dri/i965/intel_fbo.c
src/mesa/main/errors.c
src/mesa/main/hash.c
src/mesa/main/hash_table.c [deleted file]
src/mesa/main/hash_table.h [deleted file]
src/mesa/main/shaderapi.c
src/mesa/main/shared.c
src/mesa/main/syncobj.c
src/mesa/main/tests/Makefile.am
src/mesa/main/tests/hash_table/.gitignore [deleted file]
src/mesa/main/tests/hash_table/Makefile.am [deleted file]
src/mesa/main/tests/hash_table/collision.c [deleted file]
src/mesa/main/tests/hash_table/delete_and_lookup.c [deleted file]
src/mesa/main/tests/hash_table/delete_management.c [deleted file]
src/mesa/main/tests/hash_table/destroy_callback.c [deleted file]
src/mesa/main/tests/hash_table/insert_and_lookup.c [deleted file]
src/mesa/main/tests/hash_table/insert_many.c [deleted file]
src/mesa/main/tests/hash_table/null_destroy.c [deleted file]
src/mesa/main/tests/hash_table/random_entry.c [deleted file]
src/mesa/main/tests/hash_table/remove_null.c [deleted file]
src/mesa/main/tests/hash_table/replacement.c [deleted file]
src/mesa/main/vdpau.c
src/util/Makefile.am
src/util/Makefile.sources
src/util/SConscript
src/util/hash_table.c [new file with mode: 0644]
src/util/hash_table.h [new file with mode: 0644]
src/util/tests/Makefile.am
src/util/tests/hash_table/.gitignore [new file with mode: 0644]
src/util/tests/hash_table/Makefile.am [new file with mode: 0644]
src/util/tests/hash_table/collision.c [new file with mode: 0644]
src/util/tests/hash_table/delete_and_lookup.c [new file with mode: 0644]
src/util/tests/hash_table/delete_management.c [new file with mode: 0644]
src/util/tests/hash_table/destroy_callback.c [new file with mode: 0644]
src/util/tests/hash_table/insert_and_lookup.c [new file with mode: 0644]
src/util/tests/hash_table/insert_many.c [new file with mode: 0644]
src/util/tests/hash_table/null_destroy.c [new file with mode: 0644]
src/util/tests/hash_table/random_entry.c [new file with mode: 0644]
src/util/tests/hash_table/remove_null.c [new file with mode: 0644]
src/util/tests/hash_table/replacement.c [new file with mode: 0644]