[Mesa-dev] [RFC v2 20/23] RFC: anv: Drop unused anv_image_create()

Louis-Francis Ratté-Boulianne lfrb at collabora.com
Thu Aug 31 04:24:33 UTC 2017


From: Chad Versace <chadversary at chromium.org>

---
 src/intel/vulkan/anv_image.c   | 26 ++++++--------------------
 src/intel/vulkan/anv_private.h |  5 -----
 2 files changed, 6 insertions(+), 25 deletions(-)

diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 241b7c9fe0..a99f0e4b29 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -485,13 +485,13 @@ make_main_surface(const struct anv_device *dev,
 }
 
 VkResult
-anv_image_create(VkDevice _device,
-                 const struct anv_image_create_info *anv_info,
-                 const VkAllocationCallbacks* alloc,
-                 VkImage *pImage)
+anv_CreateImage(VkDevice _device,
+                const VkImageCreateInfo *base_info,
+                const VkAllocationCallbacks* alloc,
+                VkImage *pImage)
 {
    ANV_FROM_HANDLE(anv_device, device, _device);
-   const VkImageCreateInfo *base_info = anv_info->vk_info;
+   const struct anv_image_create_info anv_info = { .vk_info = base_info };
    const VkImportImageDmaBufInfoMESAX *import_dma_buf_info = NULL;
    const VkExportImageDmaBufInfoMESAX *export_dma_buf_info = NULL;
    VkExternalMemoryHandleTypeFlagsKHR handle_types = 0;
@@ -548,7 +548,7 @@ anv_image_create(VkDevice _device,
    uint32_t b;
    for_each_bit(b, image->aspects) {
       VkImageAspectFlagBits aspect = 1 << b;
-      make_main_surface(device, anv_info, import_dma_buf_info,
+      make_main_surface(device, &anv_info, import_dma_buf_info,
                         export_dma_buf_info, aspect, handle_types, image);
       make_aux_surface_maybe(device, base_info, aspect, handle_types, image);
    }
@@ -558,20 +558,6 @@ anv_image_create(VkDevice _device,
    return VK_SUCCESS;
 }
 
-VkResult
-anv_CreateImage(VkDevice device,
-                const VkImageCreateInfo *pCreateInfo,
-                const VkAllocationCallbacks *pAllocator,
-                VkImage *pImage)
-{
-   return anv_image_create(device,
-      &(struct anv_image_create_info) {
-         .vk_info = pCreateInfo,
-      },
-      pAllocator,
-      pImage);
-}
-
 void
 anv_DestroyImage(VkDevice _device, VkImage _image,
                  const VkAllocationCallbacks *pAllocator)
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 18b69ee4c6..b3e282a499 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -2285,11 +2285,6 @@ struct anv_image_create_info {
    uint32_t stride;
 };
 
-VkResult anv_image_create(VkDevice _device,
-                          const struct anv_image_create_info *info,
-                          const VkAllocationCallbacks* alloc,
-                          VkImage *pImage);
-
 const struct anv_surface *
 anv_image_get_surface_for_aspect_mask(const struct anv_image *image,
                                       VkImageAspectFlags aspect_mask);
-- 
2.13.0



More information about the mesa-dev mailing list