From: Chad Versace Date: Tue, 14 Jul 2015 16:47:45 +0000 (-0700) Subject: vk/0.132: Add vkDestroyBuffer() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e93b6d8eb114b2fc7c7b7ef624874214a37dc184;p=mesa.git vk/0.132: Add vkDestroyBuffer() --- diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index a2ebe4b106e..d4a0469aa30 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -2027,6 +2027,7 @@ typedef VkResult (VKAPI *PFN_vkCreateQueryPool)(VkDevice device, const VkQueryPo typedef VkResult (VKAPI *PFN_vkDestroyQueryPool)(VkDevice device, VkQueryPool queryPool); typedef VkResult (VKAPI *PFN_vkGetQueryPoolResults)(VkDevice device, VkQueryPool queryPool, uint32_t startQuery, uint32_t queryCount, size_t* pDataSize, void* pData, VkQueryResultFlags flags); typedef VkResult (VKAPI *PFN_vkCreateBuffer)(VkDevice device, const VkBufferCreateInfo* pCreateInfo, VkBuffer* pBuffer); +typedef VkResult (VKAPI *PFN_vkDestroyBuffer)(VkDevice device, VkBuffer buffer); typedef VkResult (VKAPI *PFN_vkCreateBufferView)(VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, VkBufferView* pView); typedef VkResult (VKAPI *PFN_vkCreateImage)(VkDevice device, const VkImageCreateInfo* pCreateInfo, VkImage* pImage); typedef VkResult (VKAPI *PFN_vkGetImageSubresourceLayout)(VkDevice device, VkImage image, const VkImageSubresource* pSubresource, VkSubresourceLayout* pLayout); @@ -2346,6 +2347,10 @@ VkResult VKAPI vkCreateBuffer( const VkBufferCreateInfo* pCreateInfo, VkBuffer* pBuffer); +VkResult VKAPI vkDestroyBuffer( + VkDevice device, + VkBuffer buffer); + VkResult VKAPI vkCreateBufferView( VkDevice device, const VkBufferViewCreateInfo* pCreateInfo, diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 133ffda3926..02e00c4a326 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -1590,6 +1590,18 @@ VkResult anv_CreateBuffer( return VK_SUCCESS; } +VkResult anv_DestroyBuffer( + VkDevice _device, + VkBuffer _buffer) +{ + ANV_FROM_HANDLE(anv_device, device, _device); + ANV_FROM_HANDLE(anv_buffer, buffer, _buffer); + + anv_device_free(device, buffer); + + return VK_SUCCESS; +} + // Buffer view functions static void