mesa: add separate hash tables for each GLSL resource type
authorMarek Olšák <marek.olsak@amd.com>
Sat, 23 Oct 2021 23:39:12 +0000 (19:39 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 29 Oct 2021 11:19:20 +0000 (07:19 -0400)
commit7fe3cc94ebed922e87aa0ac329abe52166111286
tree7e14fe66677f50eb194529e5c61bd6874bf41994
parent1b1425d45c6be1f911c7da222a2326814409ff7e
mesa: add separate hash tables for each GLSL resource type

This removes the malloc for the key, the associated string pointer
indirection, and hopefully the hash table has fewer elements than
the global one.

This decrease overhead of glGetUniformLocation.

Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13507>
src/mesa/main/mtypes.h
src/mesa/main/shader_query.cpp
src/mesa/main/shaderapi.h
src/mesa/main/shaderobj.c