st/mesa: Clear texture's views when texture is removed from Shared->TexObjects
authorDanylo Piliaiev <danylo.piliaiev@globallogic.com>
Mon, 18 May 2020 17:44:58 +0000 (20:44 +0300)
committerMarge Bot <eric+marge@anholt.net>
Mon, 25 May 2020 12:32:16 +0000 (12:32 +0000)
commit045267d1e6238e45eb98f286332ee233dec53312
tree47bd336e95ed4ee17bb0c9fc0cae2d6bd4e74125
parenta51ab5f95624d1c29d9592aa2212f80dead8ecdf
st/mesa: Clear texture's views when texture is removed from Shared->TexObjects

If texture is shared between several contexts, calling glDeleteTextures
will remove it from ctx->Shared->TexObjects - which makes impossible for
contexts, when destroyed, to release their views to this texture. Which
leaves dangling pointers to destroyed contexts.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/2960
Signed-off-by: Danylo Piliaiev <danylo.piliaiev@globallogic.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5106>
src/mesa/main/dd.h
src/mesa/main/texobj.c
src/mesa/state_tracker/st_cb_texture.c
src/mesa/state_tracker/st_sampler_view.c