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 debian #388456

00:00:23

 
  Build+Test
passed meson-clang #388458

00:08:47

passed meson-clover #388462

00:09:05

passed meson-main #388461

00:05:55

passed meson-swr-glvnd #388457

00:08:48

passed meson-vulkan #388463

00:01:50

passed scons-llvm #388465

00:04:02

passed scons-nollvm #388464

00:02:26

passed scons-swr #388459

00:10:51

passed scons-win64 #388460

00:06:43