mesa: delete framebuffer texture attachment sampler views

When a context is destroyed the destroy_tex_sampler_cb makes sure that all the
sampler views created by that context are destroyed.
This is done by walking the ctx->Shared->TexObjects hash table.

In a multiple context environment the texture can be deleted by a different context,
so it will be removed from the TexObjects table and will prevent the above mechanism
to work.
This can result in an assertion in st_save_zombie_sampler_view because the
sampler_view owns a reference to a destroyed context.

This issue occurs in blender 2.80.

This commit fixes this by explicitly releasing sampler_view created by the destroyed
context for all texture attachments.

Fixes: 593e36f9 (st/mesa: implement "zombie" sampler views (v2))
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110944
Signed-off-by: Marek Olšák <marek.olsak@amd.com>
10 jobs for !1071 with fix_sampler_view_leak in 13 minutes and 23 seconds
detached
Status Job ID Name Coverage
  Containers Build
passed #388456
debian

00:00:23

 
  Build+Test
passed #388458
meson-clang

00:08:47

passed #388462
meson-clover

00:09:05

passed #388461
meson-main

00:05:55

passed #388457
meson-swr-glvnd

00:08:48

passed #388463
meson-vulkan

00:01:50

passed #388465
scons-llvm

00:04:02

passed #388464
scons-nollvm

00:02:26

passed #388459
scons-swr

00:10:51

passed #388460
scons-win64

00:06:43