summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/hash.h
Commit message (Collapse)AuthorAgeFilesLines
* hash: Add _mesa_HashRemoveLocked() function.Matt Turner2016-05-201-0/+2
| | | | | Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa/main: Remove _mesa_HashClone()Juha-Pekka Heikkila2015-06-111-3/+0
| | | | | | | | I didn't find this being used anywhere. Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Timothy Arceri <t_arceri@yahoo.com.au> Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
* mesa: Add functions for doing unlocked hash table lookupsFredrik Höglund2014-05-021-0/+9
| | | | | | | | | | | | This patch adds functions for locking/unlocking the mutex, along with _mesa_HashLookupLocked() and _mesa_HashInsertLocked() that do lookups and insertions without locking the mutex. These functions will be used by the ARB_multi_bind entry points to avoid locking/unlocking the mutex for each binding point. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
* mesa: Add a clone function to mesa hashTimothy Arceri2013-09-041-0/+3
| | | | | | | | V2: const qualify table parameter Signed-off-by: Timothy Arceri <t_arceri@yahoo.com.au> Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: remove outdated version lines in commentsRico Schüller2013-06-051-1/+0
| | | | Signed-off-by: Brian Paul <brianp@vmware.com>
* mesa: Restore 78-column wrapping of license text in C-style comments.Kenneth Graunke2013-04-231-3/+4
| | | | | | | | | | | | | | The previous commit introduced extra words, breaking the formatting. This text transformation was done automatically via the following shell command: $ git grep 'THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY' | sed 's/:.*$//' | xargs -I {} sh -c 'vim -e -s {} < vimscript where 'vimscript' is a file containing: /THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY/;/\*\// !fmt -w 78 -p ' * ' :wq Reviewed-by: Brian Paul <brianp@vmware.com>
* mesa: Add "OR COPYRIGHT HOLDERS" to license text disclaiming liability.Kenneth Graunke2013-04-231-1/+1
| | | | | | | | | | | | | | | This brings the license text in line with the MIT License as published on the Open Source Initiative website: http://opensource.org/licenses/mit-license.php Generated automatically be the following shell command: $ git grep 'THE AUTHORS BE LIABLE' | sed 's/:.*$//g' | xargs -I '{}' \ sed -i 's/THE AUTHORS/THE AUTHORS OR COPYRIGHT HOLDERS/' {} This introduces some wrapping issues, to be fixed in the next commit. Reviewed-by: Brian Paul <brianp@vmware.com>
* 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 <brianp@vmware.com>
* 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 <brianp@vmware.com> Acked-by: Chad Versace <chad.versace@linux.intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org> (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 <brianp@vmware.com> (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