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)
committerJason Ekstrand <jason.ekstrand@intel.com>
Mon, 17 Jul 2017 15:18:46 +0000 (08:18 -0700)
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable@lists.freedesktop.org
src/intel/vulkan/anv_image.c

index c84fc8ddeabe83147f1dabe745c724d549d75abf..a4cf6f80641d297b466a76a97d90ec8ed1aa3246 100644 (file)
@@ -776,6 +776,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);