anv: Move BindImageMemory to anv_image.c
authorJason Ekstrand <jason.ekstrand@intel.com>
Thu, 6 Oct 2016 22:21:50 +0000 (15:21 -0700)
committerNanley Chery <nanley.g.chery@intel.com>
Fri, 7 Oct 2016 19:54:18 +0000 (12:54 -0700)
Signed-off-by: Nanley Chery <nanley.g.chery@intel.com>
Reviewed-by: Chad Versace <chadversary@chromium.org>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
src/intel/vulkan/anv_device.c
src/intel/vulkan/anv_image.c

index c7b997904bf5ec0aaee37136e0d01a3a7bd05bd2..9f8fa33e2f9a3840135a71a3fc8b8a5e19a0fa26 100644 (file)
@@ -1421,26 +1421,6 @@ VkResult anv_BindBufferMemory(
    return VK_SUCCESS;
 }
 
-VkResult anv_BindImageMemory(
-    VkDevice                                    device,
-    VkImage                                     _image,
-    VkDeviceMemory                              _memory,
-    VkDeviceSize                                memoryOffset)
-{
-   ANV_FROM_HANDLE(anv_device_memory, mem, _memory);
-   ANV_FROM_HANDLE(anv_image, image, _image);
-
-   if (mem) {
-      image->bo = &mem->bo;
-      image->offset = memoryOffset;
-   } else {
-      image->bo = NULL;
-      image->offset = 0;
-   }
-
-   return VK_SUCCESS;
-}
-
 VkResult anv_QueueBindSparse(
     VkQueue                                     queue,
     uint32_t                                    bindInfoCount,
index 77dcd46236e2e50233d6b1754ee85f32ce993939..7dada66d7012775d3b7a30b60d816a8ef4e29a9c 100644 (file)
@@ -316,6 +316,26 @@ anv_DestroyImage(VkDevice _device, VkImage _image,
    anv_free2(&device->alloc, pAllocator, anv_image_from_handle(_image));
 }
 
+VkResult anv_BindImageMemory(
+    VkDevice                                    device,
+    VkImage                                     _image,
+    VkDeviceMemory                              _memory,
+    VkDeviceSize                                memoryOffset)
+{
+   ANV_FROM_HANDLE(anv_device_memory, mem, _memory);
+   ANV_FROM_HANDLE(anv_image, image, _image);
+
+   if (mem) {
+      image->bo = &mem->bo;
+      image->offset = memoryOffset;
+   } else {
+      image->bo = NULL;
+      image->offset = 0;
+   }
+
+   return VK_SUCCESS;
+}
+
 static void
 anv_surface_get_subresource_layout(struct anv_image *image,
                                    struct anv_surface *surface,