mesa/st/i965: add a ProgramResourceHash for quicker resource lookup
authorTapani Pälli <tapani.palli@intel.com>
Fri, 3 Jan 2020 05:56:23 +0000 (07:56 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 7 Jan 2020 10:48:41 +0000 (10:48 +0000)
commitdd09f1d806bab62e2399d2fc7a5d0922c594eab3
tree7958b8eec9f359fefc6b31e4deb1f7a6539fe2b8
parent5f0ff004ca8f0e59270f0ea4dc8f13c74ce88e2b
mesa/st/i965: add a ProgramResourceHash for quicker resource lookup

Many resource APIs require searching by name, add a hash table to make
this faster. Currently we traverse the whole resource list for name
based queries, this change makes all these cases use the hash.

Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2203
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3254>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3254>
src/mesa/drivers/dri/i965/brw_link.cpp
src/mesa/main/mtypes.h
src/mesa/main/shader_query.cpp
src/mesa/main/shaderapi.h
src/mesa/main/shaderobj.c
src/mesa/state_tracker/st_glsl_to_nir.cpp
src/mesa/state_tracker/st_glsl_to_tgsi.cpp