From 06d8fd58818c4574ba233edb4566509577d79dd0 Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Fri, 4 Sep 2015 11:14:03 -0700 Subject: [PATCH] vk/instance: Expose anv_instance_alloc/free --- src/vulkan/anv_device.c | 4 ++-- src/vulkan/anv_private.h | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/vulkan/anv_device.c b/src/vulkan/anv_device.c index 7ae11d6560b..0df1bbeda3c 100644 --- a/src/vulkan/anv_device.c +++ b/src/vulkan/anv_device.c @@ -158,7 +158,7 @@ VkResult anv_DestroyInstance( return VK_SUCCESS; } -static void * +void * anv_instance_alloc(struct anv_instance *instance, size_t size, size_t alignment, VkSystemAllocType allocType) { @@ -171,7 +171,7 @@ anv_instance_alloc(struct anv_instance *instance, size_t size, return mem; } -static void +void anv_instance_free(struct anv_instance *instance, void *mem) { if (mem == NULL) diff --git a/src/vulkan/anv_private.h b/src/vulkan/anv_private.h index 06ef4e123f3..8be2aa2bee1 100644 --- a/src/vulkan/anv_private.h +++ b/src/vulkan/anv_private.h @@ -411,6 +411,16 @@ struct anv_device { pthread_mutex_t mutex; }; +void * +anv_instance_alloc(struct anv_instance * instance, + size_t size, + size_t alignment, + VkSystemAllocType allocType); + +void +anv_instance_free(struct anv_instance * instance, + void * mem); + void * anv_device_alloc(struct anv_device * device, size_t size, -- 2.30.2