v3dv: implement vkDestroyImage and vkDestroyImageView
authorIago Toral Quiroga <itoral@igalia.com>
Tue, 17 Dec 2019 07:47:08 +0000 (08:47 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 13 Oct 2020 21:21:25 +0000 (21:21 +0000)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6766>

src/broadcom/vulkan/v3dv_image.c

index e149ae9..f01d0b4 100644 (file)
@@ -310,10 +310,13 @@ v3dv_CreateImage(VkDevice _device,
 }
 
 void
-v3dv_DestroyImage(VkDevice device,
-                  VkImage image,
+v3dv_DestroyImage(VkDevice _device,
+                  VkImage _image,
                   const VkAllocationCallbacks* pAllocator)
 {
+   V3DV_FROM_HANDLE(v3dv_device, device, _device);
+   V3DV_FROM_HANDLE(v3dv_image, image, _image);
+   vk_free2(&device->alloc, pAllocator, image);
 }
 
 VkResult
@@ -392,8 +395,12 @@ v3dv_CreateImageView(VkDevice _device,
 }
 
 void
-v3dv_DestroyImageView(VkDevice device,
+v3dv_DestroyImageView(VkDevice _device,
                       VkImageView imageView,
                       const VkAllocationCallbacks* pAllocator)
 {
+   V3DV_FROM_HANDLE(v3dv_device, device, _device);
+   V3DV_FROM_HANDLE(v3dv_image_view, image_view, imageView);
+
+   vk_free2(&device->alloc, pAllocator, image_view);
 }