From: Jason Ekstrand Date: Fri, 4 Sep 2015 18:14:03 +0000 (-0700) Subject: vk/instance: Expose anv_instance_alloc/free X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=06d8fd58818c4574ba233edb4566509577d79dd0;p=mesa.git vk/instance: Expose anv_instance_alloc/free --- 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,