OSDN Git Service

anv: Stop leaking the no_aux sampler surface state
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 11 Jul 2017 15:13:13 +0000 (08:13 -0700)
committerEmil Velikov <emil.l.velikov@gmail.com>
Wed, 2 Aug 2017 23:19:06 +0000 (00:19 +0100)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable@lists.freedesktop.org
(cherry picked from commit cbdfd1daa24ee9a7a612f7b0e9aa4610af05e211)

src/intel/vulkan/anv_image.c

index ba1873e..13a85b2 100644 (file)
@@ -773,6 +773,11 @@ anv_DestroyImageView(VkDevice _device, VkImageView _iview,
                           iview->sampler_surface_state);
    }
 
+   if (iview->no_aux_sampler_surface_state.alloc_size > 0) {
+      anv_state_pool_free(&device->surface_state_pool,
+                          iview->no_aux_sampler_surface_state);
+   }
+
    if (iview->storage_surface_state.alloc_size > 0) {
       anv_state_pool_free(&device->surface_state_pool,
                           iview->storage_surface_state);