Re: [Mesa-dev] [PATCH] anv: Stop leaking the no_aux sampler surface state

2017-07-11 Thread Lionel Landwerlin

Well spotted!

Reviewed-by: Lionel Landwerlin 

On 11/07/17 16:14, Jason Ekstrand wrote:

Cc: mesa-sta...@lists.freedesktop.org
---
  src/intel/vulkan/anv_image.c | 5 +
  1 file changed, 5 insertions(+)

diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 76ab923..9992685 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -775,6 +775,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);



___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] anv: Stop leaking the no_aux sampler surface state

2017-07-11 Thread Jason Ekstrand
Cc: mesa-sta...@lists.freedesktop.org
---
 src/intel/vulkan/anv_image.c | 5 +
 1 file changed, 5 insertions(+)

diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 76ab923..9992685 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -775,6 +775,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);
-- 
2.5.0.400.gff86faf

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev