mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 05:10:11 +01:00
panvk: do not access the image in image view's destructor
Vulkan allows destroying an image without destroying the views of
this image first. These views can not be used in any way and the
only thing that the user can do with such a view is destroy it.
This also means that the driver can not refer to the image inside
the image view's destructor.
Fixes cb3f6481 ("panvk: Create MS shadow images and views")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38972>
This commit is contained in:
parent
bf2aa05b60
commit
d8ceb38ef1
1 changed files with 3 additions and 6 deletions
|
|
@ -437,12 +437,9 @@ panvk_per_arch(DestroyImageView)(VkDevice _device, VkImageView _view,
|
||||||
if (!view)
|
if (!view)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (view->vk.image->create_flags &
|
for (uint32_t i = 0; i < ARRAY_SIZE(view->ms_views); ++i) {
|
||||||
VK_IMAGE_CREATE_MULTISAMPLED_RENDER_TO_SINGLE_SAMPLED_BIT_EXT) {
|
panvk_per_arch(DestroyImageView)(_device, view->ms_views[i],
|
||||||
for (uint32_t i = 0; i < ARRAY_SIZE(view->ms_views); ++i) {
|
pAllocator);
|
||||||
panvk_per_arch(DestroyImageView)(_device, view->ms_views[i],
|
|
||||||
pAllocator);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
panvk_pool_free_mem(&view->mem);
|
panvk_pool_free_mem(&view->mem);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue