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: mesa/mesa#2203
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Tested-by: Marge Bot <mesa/mesa!3254>
Part-of: <mesa/mesa!3254>
41 jobs for !3254 with hash-resources in 27 minutes and 34 seconds (queued for 2 seconds)
detached
Status Job ID Name Coverage
  Container
passed #1288777
aarch64
arm_build

00:00:18

passed #1288778
aarch64
arm_test

00:00:19

passed #1288773
lava_arm64

00:00:26

passed #1288772
lava_armhf

00:00:24

passed #1288774
x86_build

00:14:19

passed #1288776
x86_build_old

00:00:19

passed #1288775
x86_test-gl

00:00:40

 
  Build
passed #1288780
lava-build:arm64

00:00:43

passed #1288779
lava-build:armhf

00:03:33

passed #1288784
aarch64
meson-arm64

00:02:43

passed #1288783
aarch64
meson-armhf

00:02:15

passed #1288785
meson-clang

00:09:19

passed #1288788
meson-clover

00:06:12

passed #1288789
meson-clover-old-llvm

00:04:15

passed #1288791
meson-i386

00:04:28

passed #1288782
meson-main

00:08:16

passed #1288792
meson-mingw32-x86_64

00:07:14

passed #1288781
meson-testing

00:06:23

passed #1288790
meson-vulkan

00:07:14

passed #1288793
scons

00:05:54

passed #1288794
scons-old-llvm

00:03:44

passed #1288786
scons-swr

00:03:04

passed #1288787
scons-win64

00:10:21

 
  Test
passed #1288812
db410c
arm64_a306_gles2

00:05:07

passed #1288809
mesa-cheza
arm64_a630_gles2

00:01:33

passed #1288811
mesa-cheza
arm64_a630_gles3

00:05:50

passed #1288810
mesa-cheza
arm64_a630_gles31

00:04:16

passed #1288795
lava-sun50i-h6-pine-h64
panfrost-t720-test:arm64

00:08:26

passed #1288796
lava-rk3288-veyron-jaq
panfrost-t760-test:armhf

00:04:56

passed #1288797
lava-rk3399-gru-kevin
panfrost-t860-test:arm64

00:05:23

passed #1288799
piglit-glslparser

00:04:26

passed #1288798
piglit-quick_gl

00:06:50

passed #1288800
piglit-quick_shader

00:04:21

passed #1288801
test-llvmpipe-gles2

00:03:57

passed #1288802
test-softpipe-gles2

00:01:17

passed #1288805
test-softpipe-gles31 1/4

00:02:14

passed #1288803
test-softpipe-gles3 1/2

00:05:11

passed #1288806
test-softpipe-gles31 2/4

00:04:13

passed #1288807
test-softpipe-gles31 3/4

00:04:57

passed #1288808
test-softpipe-gles31 4/4

00:03:16

passed #1288804
test-softpipe-gles3 2/2

00:05:38