compiler/types: Make key in subroutine_name more effective
authorCaio Oliveira <caio.oliveira@intel.com>
Sat, 27 May 2023 04:54:53 +0000 (21:54 -0700)
committerMarge Bot <emma+marge@anholt.net>
Wed, 7 Jun 2023 23:01:59 +0000 (23:01 +0000)
commit0f54621564586043cccfd29f0e7b17c427faf3ee
treead50ecf352e13d0100ccaf0b0000564f4d976a18
parentd57eedefa9be619947a1fa9e9140c2dd2d5f26bf
compiler/types: Make key in subroutine_name more effective

Use the string itself as a key for searching -- and the internal
allocated name as a key when storing.

Because record_key_hash doesn't consider the name field, which is
the only used field for a SUBROUTINE type, the hash key was always
the same for all types.  Using the name fixes this.

Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23277>
src/compiler/glsl_types.cpp