vk/0.132: Add vkDestroyBuffer()
authorChad Versace <chad.versace@intel.com>
Tue, 14 Jul 2015 16:47:45 +0000 (09:47 -0700)
committerChad Versace <chad.versace@intel.com>
Tue, 14 Jul 2015 16:47:45 +0000 (09:47 -0700)
include/vulkan/vulkan.h
src/vulkan/device.c

index a2ebe4b106e55ce7e29535365a15a9717f46d6e9..d4a0469aa303b5dd85860144c60433f53b1e0dcb 100644 (file)
@@ -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,
index 133ffda39265646b5c68b80f4c2fe04af93e79a8..02e00c4a326d9c02ca4826222070b8a53b5b01cd 100644 (file)
@@ -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