summaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/radv_wsi_x11.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2016-10-14 13:36:45 +1000
committerDave Airlie <[email protected]>2016-10-19 09:05:26 +1000
commit4450f405195d77f8bcc3fbd3e590405c8f540fab (patch)
treeec931282a17a12fec97a7d0f4bfe61d49ca7b8b2 /src/amd/vulkan/radv_wsi_x11.c
parent1ae6ece9802e77ede97722c0f7cdd0c24e6fbd04 (diff)
radv: move to using shared vk_alloc inlines.
This moves to the shared vk_alloc inlines for vulkan memory allocations. Acked-by: Jason Ekstrand <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd/vulkan/radv_wsi_x11.c')
-rw-r--r--src/amd/vulkan/radv_wsi_x11.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/amd/vulkan/radv_wsi_x11.c b/src/amd/vulkan/radv_wsi_x11.c
index 8e0040ffd46..cbb5b3038fe 100644
--- a/src/amd/vulkan/radv_wsi_x11.c
+++ b/src/amd/vulkan/radv_wsi_x11.c
@@ -58,7 +58,7 @@ wsi_x11_connection_create(struct radv_physical_device *device,
xcb_query_extension_reply_t *dri3_reply, *pres_reply;
struct wsi_x11_connection *wsi_conn =
- radv_alloc(&device->instance->alloc, sizeof(*wsi_conn), 8,
+ vk_alloc(&device->instance->alloc, sizeof(*wsi_conn), 8,
VK_SYSTEM_ALLOCATION_SCOPE_INSTANCE);
if (!wsi_conn)
return NULL;
@@ -71,7 +71,7 @@ wsi_x11_connection_create(struct radv_physical_device *device,
if (dri3_reply == NULL || pres_reply == NULL) {
free(dri3_reply);
free(pres_reply);
- radv_free(&device->instance->alloc, wsi_conn);
+ vk_free(&device->instance->alloc, wsi_conn);
return NULL;
}
@@ -88,7 +88,7 @@ static void
wsi_x11_connection_destroy(struct radv_physical_device *device,
struct wsi_x11_connection *conn)
{
- radv_free(&device->instance->alloc, conn);
+ vk_free(&device->instance->alloc, conn);
}
static struct wsi_x11_connection *
@@ -443,7 +443,7 @@ VkResult radv_CreateXcbSurfaceKHR(
VkIcdSurfaceXcb *surface;
- surface = radv_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);
@@ -469,7 +469,7 @@ VkResult radv_CreateXlibSurfaceKHR(
VkIcdSurfaceXlib *surface;
- surface = radv_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);
@@ -796,7 +796,7 @@ x11_swapchain_destroy(struct radv_swapchain *radv_chain,
xcb_unregister_for_special_event(chain->conn, chain->special_event);
- radv_free2(&chain->base.device->alloc, pAllocator, chain);
+ vk_free2(&chain->base.device->alloc, pAllocator, chain);
return VK_SUCCESS;
}
@@ -826,7 +826,7 @@ x11_surface_create_swapchain(VkIcdSurfaceBase *icd_surface,
num_images = MAX2(num_images, 4);
size_t size = sizeof(*chain) + num_images * sizeof(chain->images[0]);
- chain = radv_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);
@@ -889,7 +889,7 @@ fail_init_images:
fail_register:
xcb_unregister_for_special_event(chain->conn, chain->special_event);
- radv_free2(&device->alloc, pAllocator, chain);
+ vk_free2(&device->alloc, pAllocator, chain);
return result;
}
@@ -900,7 +900,7 @@ radv_x11_init_wsi(struct radv_physical_device *device)
struct wsi_x11 *wsi;
VkResult result;
- wsi = radv_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);
@@ -940,7 +940,7 @@ radv_x11_init_wsi(struct radv_physical_device *device)
fail_mutex:
pthread_mutex_destroy(&wsi->mutex);
fail_alloc:
- radv_free(&device->instance->alloc, wsi);
+ vk_free(&device->instance->alloc, wsi);
fail:
device->wsi[VK_ICD_WSI_PLATFORM_XCB] = NULL;
device->wsi[VK_ICD_WSI_PLATFORM_XLIB] = NULL;
@@ -959,6 +959,6 @@ radv_x11_finish_wsi(struct radv_physical_device *device)
pthread_mutex_destroy(&wsi->mutex);
- radv_free(&device->instance->alloc, wsi);
+ vk_free(&device->instance->alloc, wsi);
}
}