mesa: handle hash collisions in program resource lookups (e.g. uniforms)
authorMarek Olšák <marek.olsak@amd.com>
Sat, 23 Oct 2021 03:30:06 +0000 (23:30 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 29 Oct 2021 11:19:20 +0000 (07:19 -0400)
commit1b1425d45c6be1f911c7da222a2326814409ff7e
treedecbd70a895adf88a1e8fd6c0a5f68518a517cf8
parentaad903c3f5357697adb4bee82399904d3e78d992
mesa: handle hash collisions in program resource lookups (e.g. uniforms)

We computed the hash of the name and used it as a key, and then the table
computed the hash of the hash.

Do it properly: Pass the name as a string into the hash table and let
the table handle everything.

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