v3dv: don't leak the texture shader state BO from image views
authorIago Toral Quiroga <itoral@igalia.com>
Thu, 23 Apr 2020 08:59:55 +0000 (10:59 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:29 +0000 (21:21 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>

src/broadcom/vulkan/v3dv_image.c

index 7a53b2a..ee862e8 100644 (file)
@@ -650,6 +650,9 @@ v3dv_DestroyImageView(VkDevice _device,
    V3DV_FROM_HANDLE(v3dv_device, device, _device);
    V3DV_FROM_HANDLE(v3dv_image_view, image_view, imageView);
 
+   if (image_view->texture_shader_state)
+      v3dv_bo_free(device, image_view->texture_shader_state);
+
    vk_free2(&device->alloc, pAllocator, image_view);
 }