summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_wsi_wayland.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2016-10-14 13:31:35 +1000
committerDave Airlie <[email protected]>2016-10-19 09:05:26 +1000
commit1ae6ece9802e77ede97722c0f7cdd0c24e6fbd04 (patch)
treea4bd20d4a57a7853616b8696b6dfa47ad200faea /src/intel/vulkan/anv_wsi_wayland.c
parent0cfd428aefe13441e93cc6f57d70f0b282ad2b21 (diff)
anv: move to using vk_alloc helpers.
This moves all the alloc/free in anv to the generic helpers. Acked-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_wsi_wayland.c')
-rw-r--r--src/intel/vulkan/anv_wsi_wayland.c16
1 files changed, 8 insertions, 8 deletions
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);
}
}