panfrost: Replace writers pointer with hash table

This ensures each context can have a separate batch writing a resource
and we don't race trying to flush each other's batches. Unfortunately
the extra hash table operations regress draw-overhead numbers by about
8% but I'd rather eat the overhead and have an obviously correct
implementation than leave known buggy code in tree.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Cc: mesa-stable
Part-of: <!12528>
43 jobs for !12528 with dumb-shortened in 17 minutes and 32 seconds (queued for 10 seconds)
latest detached
Status Name Job ID Coverage
  Sanity
passed sanity #13067820

00:00:37

 
  Container
passed debian/arm_build #13067823
aarch64

00:00:17

passed debian/x86_build-base #13067821

00:00:11

passed debian/x86_test-base #13067822

00:00:13

passed fedora/x86_build #13067824

00:00:19

passed windows_build_vs2019 #13067825
windows shell 1809 mesa

00:00:09

 
  Container 2
passed debian/android_build #13067830

00:00:11

passed debian/i386_build #13067827

00:00:14

passed debian/ppc64el_build #13067828

00:00:14

passed debian/s390x_build #13067829

00:00:14

passed debian/x86_build #13067826

00:00:14

passed debian/x86_test-gl #13067831

00:00:15

passed debian/x86_test-vk #13067832

00:00:13

passed kernel+rootfs_amd64 #13067833

00:00:15

passed kernel+rootfs_arm64 #13067834
aarch64

00:00:56

passed kernel+rootfs_armhf #13067835
aarch64

00:00:11

 
  Build X86 64
passed debian-clang #13067842

00:03:47

passed debian-clover #13067843

00:01:39

passed debian-clover-testing #13067838

00:01:18

passed debian-gallium #13067839

00:03:40

passed debian-release #13067840

00:03:12

passed debian-testing #13067836

00:01:44

passed debian-testing-asan #13067837

00:01:58

passed debian-vulkan #13067844

00:01:18

passed fedora-release #13067841

00:01:30

 
  Build Misc
passed debian-android #13067846

00:01:06

passed debian-arm64 #13067848
aarch64

00:01:22

passed debian-arm64-asan #13067849
aarch64

00:02:57

passed debian-arm64-build-test #13067850
aarch64

00:01:28

passed debian-armhf #13067847
aarch64

00:01:47

passed debian/arm_test #13067845

00:00:19

passed debian-i386 #13067851

00:01:35

passed debian-mingw32-x86_64 #13067852

00:02:00

 
  Arm
passed panfrost-g52-gl:arm64 1/3 #13067860
mesa-ci-x86-64-lava-meson-g12b-a311d-khadas-vim3

00:09:01

passed panfrost-g52-gl:arm64 2/3 #13067861
mesa-ci-x86-64-lava-meson-g12b-a311d-khadas-vim3

00:09:22

passed panfrost-g52-gl:arm64 3/3 #13067862
mesa-ci-x86-64-lava-meson-g12b-a311d-khadas-vim3

00:08:44

passed panfrost-t720-gles2:arm64 #13067853
mesa-ci-x86-64-lava-sun50i-h6-pine-h64

00:15:05

passed panfrost-t760-gles2:armhf #13067854
mesa-ci-x86-64-lava-rk3288-veyron-jaq

00:05:56

passed panfrost-t760-traces:armhf #13067855
mesa-ci-x86-64-lava-rk3288-veyron-jaq

00:08:22

passed panfrost-t860-gl:arm64 1/3 #13067856
mesa-ci-x86-64-lava-rk3399-gru-kevin

00:06:35

passed panfrost-t860-gl:arm64 2/3 #13067857
mesa-ci-x86-64-lava-rk3399-gru-kevin

00:07:29

passed panfrost-t860-gl:arm64 3/3 #13067858
mesa-ci-x86-64-lava-rk3399-gru-kevin

00:08:17

passed panfrost-t860-traces:arm64 #13067859
mesa-ci-x86-64-lava-rk3399-gru-kevin

00:07:39