summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/hash.h
Commit message (Collapse)AuthorAgeFilesLines
* mesa: Change "BRIAN PAUL" to "THE AUTHORS" in license text.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | | Generated automatically be the following shell command: $ git grep 'BRIAN PAUL BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/BRIAN PAUL/THE AUTHORS/' {} The intention here is to protect all authors, not just Brian Paul. I believe that was already the sensible interpretation, but spelling it out is probably better. More practically, it also prevents people from accidentally copy & pasting the license into a new file which says Brian is not liable when he isn't even one of the authors. Reviewed-by: Brian Paul <[email protected]>
* mesa: Convert the hash table for GL object ids to the open-addressing hash.Eric Anholt2012-11-121-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The previous 1023-entry chaining hash table never resized, so it was very inefficient when there were many objects live. While one could have an even more efficient implementation than this (keep an array for genned names with packed IDs, or take advantage of the fact that key == hash or key == *(uint32_t *)data to store less data), this is fairly fast, and I want a nice replacement hash table for other parts of Mesa, too. It improves Minecraft performance 12.3% +/- 1.4% (n=9), dropping hash lookups from 8% of the profile to 0.5%. I also tested cairo-gl, which should be a pessimal workload for this hash table: around 247000 FBOs created and destroyed, only around 65 live at any time, and few lookups of them between creation and destruction. No statistically significant performance difference at n=76 (mean 20.3/20.4 seconds, sd 2.8/3.2 seconds). If I remove the >20 seconds outliers that appear to be due to thermal throttling, there's possibly a .97% +/- 0.31% performance win (n=61/59). The choice of cutoff for outliers feels a lot like cooking the data, but I've gone through this process 3 times for minor iterations of the code with the same conclusion each time. Reviewed-by: Brian Paul <[email protected]> Acked-by: Chad Versace <[email protected]> Acked-by: Kenneth Graunke <[email protected]> (v1)
* mesa: add _mesa_HashNumEntries() functionBrian Paul2012-01-111-0/+3
| | | | | Useful when debugging to find the number of texture objects, shader programs, etc.
* mesa: Lock mutex around _mesa_HashLookup linked list chase.Brian Paul2010-02-161-1/+1
| | | | | | | | | Remove const qualifier from _mesa_HashLookup() table parameter to avoid LOCK/UNLOCK warnings in the function body. Signed-off-by: Brian Paul <[email protected]> (cherry picked from commit 3094adb3caeb90124359db2356df3bf8ee94800a)
* Added _mesa_HashDeleteAll() to delete all entries in a hash table with aBrian Paul2006-06-301-2/+12
| | | | | callback function. Added _mesa_HashWalk() to walk over all entries in a hash table with callback.
* Added _mesa_HashNextEntry() function to allow walking over all entriesBrian Paul2005-01-241-9/+6
| | | | | | in a hash table. Added _mesa_test_hash_functions() for unit testing. Updated comments, etc.
* Merge Jose's documentation and core Mesa changes from embedded branchKeith Whitwell2003-07-171-0/+4
|
* Removed all RCS / CVS tags (Id, Header, Date, etc.) from everything.Ian Romanick2003-06-051-1/+0
|
* doxygen commentsBrian Paul2002-09-161-3/+6
|
* Consistent copyright info (version number, date) across all files.Gareth Hughes2001-03-121-7/+7
|
* removed a few const keywords because of mutex callsBrian Paul2000-03-211-3/+3
|
* prefixed hash functions with _mesa_Brian Paul2000-01-241-10/+10
|
* first big check-in of new Mesa 3.3 codeBrian Paul1999-11-111-6/+3
|
* Initial revisionjtg1999-08-191-0/+59