summaryrefslogtreecommitdiff
path: root/src/mesa/main/hash_table.c
AgeCommit message (Collapse)AuthorFilesLines
2013-07-12mesa: fix inconsistent function declaration, definitionsBrian Paul1-2/+2
To silence MSVC warnings that the declaration and definitions were different.
2013-02-08Consolidate some redundant definitions of ARRAY_SIZE() macro.Paul Berry1-2/+1
Previous to this patch, there were 13 identical definitions of this macro in Mesa source. That's ridiculous. This patch consolidates 6 of them to a single definition in src/mesa/main/macros.h. Unfortunately, I wasn't able to eliminate the remaining definitions, since they occur in places that don't include src/mesa/main/macros.h: - include/pci_ids/pci_id_driver_map.h - src/egl/drivers/dri2/egl_dri2.h - src/egl/main/egldefines.h - src/gbm/main/backend.c - src/gbm/main/gbm.c - src/glx/glxclient.h - src/mapi/mapi/stub.c I'm open to suggestions as to how to deal with the remaining redundancy. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
2012-11-12mesa: Replace random with standard C rand.Vinson Lee1-1/+1
BSD random is not available on some compilers. Signed-off-by: Vinson Lee <vlee@freedesktop.org>
2012-11-12mesa: Import a copy of the open-addressing hash table code I wrote.Eric Anholt1-0/+442
Mesa's chaining hash table for object names is slow, and this should be much faster. I namespaced the functions under _mesa_*, to avoid visibility troubles that we may have had before with hash_table_* functions. v2: Move .c file to main/, const a few things, clean up loop conditions, add/extend some comments. Reviewed-by: Brian Paul <brianp@vmware.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> Acked-by: Kenneth Graunke <kenneth@whitecape.org> (v1)