From 1ae6ece9802e77ede97722c0f7cdd0c24e6fbd04 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 14 Oct 2016 13:31:35 +1000 Subject: anv: move to using vk_alloc helpers. This moves all the alloc/free in anv to the generic helpers. Acked-by: Jason Ekstrand Signed-off-by: Dave Airlie --- src/intel/vulkan/anv_wsi_wayland.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/intel/vulkan/anv_wsi_wayland.c') diff --git a/src/intel/vulkan/anv_wsi_wayland.c b/src/intel/vulkan/anv_wsi_wayland.c index 5b1a6759ac6..ad3a8038069 100644 --- a/src/intel/vulkan/anv_wsi_wayland.c +++ b/src/intel/vulkan/anv_wsi_wayland.c @@ -233,14 +233,14 @@ wsi_wl_display_destroy(struct wsi_wayland *wsi, struct wsi_wl_display *display) u_vector_finish(&display->formats); if (display->drm) wl_drm_destroy(display->drm); - anv_free(&wsi->physical_device->instance->alloc, display); + vk_free(&wsi->physical_device->instance->alloc, display); } static struct wsi_wl_display * wsi_wl_display_create(struct wsi_wayland *wsi, struct wl_display *wl_display) { struct wsi_wl_display *display = - anv_alloc(&wsi->physical_device->instance->alloc, sizeof(*display), 8, + vk_alloc(&wsi->physical_device->instance->alloc, sizeof(*display), 8, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); if (!display) return NULL; @@ -442,7 +442,7 @@ VkResult anv_CreateWaylandSurfaceKHR( VkIcdSurfaceWayland *surface; - surface = anv_alloc2(&instance->alloc, pAllocator, sizeof *surface, 8, + surface = vk_alloc2(&instance->alloc, pAllocator, sizeof *surface, 8, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); if (surface == NULL) return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); @@ -728,7 +728,7 @@ wsi_wl_swapchain_destroy(struct anv_swapchain *anv_chain, wsi_wl_image_finish(chain, &chain->images[i], pAllocator); } - anv_free2(&chain->base.device->alloc, pAllocator, chain); + vk_free2(&chain->base.device->alloc, pAllocator, chain); return VK_SUCCESS; } @@ -760,7 +760,7 @@ wsi_wl_surface_create_swapchain(VkIcdSurfaceBase *icd_surface, num_images = MAX2(num_images, 4); size_t size = sizeof(*chain) + num_images * sizeof(chain->images[0]); - chain = anv_alloc2(&device->alloc, pAllocator, size, 8, + chain = vk_alloc2(&device->alloc, pAllocator, size, 8, VK_SYSTEM_ALLOCATION_SCOPE_OBJECT); if (chain == NULL) return vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); @@ -825,7 +825,7 @@ anv_wl_init_wsi(struct anv_physical_device *device) struct wsi_wayland *wsi; VkResult result; - wsi = anv_alloc(&device->instance->alloc, sizeof(*wsi), 8, + wsi = vk_alloc(&device->instance->alloc, sizeof(*wsi), 8, VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE); if (!wsi) { result = vk_error(VK_ERROR_OUT_OF_HOST_MEMORY); @@ -867,7 +867,7 @@ fail_mutex: pthread_mutex_destroy(&wsi->mutex); fail_alloc: - anv_free(&device->instance->alloc, wsi); + vk_free(&device->instance->alloc, wsi); fail: device->wsi[VK_ICD_WSI_PLATFORM_WAYLAND] = NULL; @@ -885,6 +885,6 @@ anv_wl_finish_wsi(struct anv_physical_device *device) pthread_mutex_destroy(&wsi->mutex); - anv_free(&device->instance->alloc, wsi); + vk_free(&device->instance->alloc, wsi); } } -- cgit v1.2.3