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 6991c2922f
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>
This commit is contained in:
Kenneth Graunke
2014-02-25 01:08:45 -08:00
committed by Jason Ekstrand
parent 1e0da6233b
commit 72e55bb688
35 changed files with 25 additions and 27 deletions

View File

@@ -30,7 +30,6 @@
#include "imports.h"
#include "mtypes.h"
#include "hash.h"
#include "hash_table.h"
#include "atifragshader.h"
#include "bufferobj.h"
#include "shared.h"
@@ -42,6 +41,7 @@
#include "shaderobj.h"
#include "syncobj.h"
#include "util/hash_table.h"
/**
* Allocate and initialize a shared context state structure.