From: Chad Versace Date: Tue, 14 Jul 2015 17:38:22 +0000 (-0700) Subject: vk/0.132: Add vkDestroyDescriptorPool() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9250e1e9e515f68a5f19b5ac2f7b8fad6e7db1bd;p=mesa.git vk/0.132: Add vkDestroyDescriptorPool() --- diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 33885c09abc..eb5514c59eb 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -2054,6 +2054,7 @@ typedef VkResult (VKAPI *PFN_vkDestroySampler)(VkDevice device, VkSampler sample typedef VkResult (VKAPI *PFN_vkCreateDescriptorSetLayout)(VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout); typedef VkResult (VKAPI *PFN_vkDestroyDescriptorSetLayout)(VkDevice device, VkDescriptorSetLayout descriptorSetLayout); typedef VkResult (VKAPI *PFN_vkCreateDescriptorPool)(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool); +typedef VkResult (VKAPI *PFN_vkDestroyDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool); typedef VkResult (VKAPI *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool); typedef VkResult (VKAPI *PFN_vkAllocDescriptorSets)(VkDevice device, VkDescriptorPool descriptorPool, VkDescriptorSetUsage setUsage, uint32_t count, const VkDescriptorSetLayout* pSetLayouts, VkDescriptorSet* pDescriptorSets, uint32_t* pCount); typedef VkResult (VKAPI *PFN_vkUpdateDescriptorSets)(VkDevice device, uint32_t writeCount, const VkWriteDescriptorSet* pDescriptorWrites, uint32_t copyCount, const VkCopyDescriptorSet* pDescriptorCopies); @@ -2488,6 +2489,10 @@ VkResult VKAPI vkCreateDescriptorPool( const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool); +VkResult VKAPI vkDestroyDescriptorPool( + VkDevice device, + VkDescriptorPool descriptorPool); + VkResult VKAPI vkResetDescriptorPool( VkDevice device, VkDescriptorPool descriptorPool); diff --git a/src/vulkan/device.c b/src/vulkan/device.c index e54920efcf6..9d1c0019a68 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -1206,8 +1206,7 @@ VkResult anv_DestroyObject( return anv_FreeMemory(_device, (VkDeviceMemory) _object); case VK_OBJECT_TYPE_DESCRIPTOR_POOL: - /* These are just dummys anyway, so we don't need to destroy them */ - return VK_SUCCESS; + return anv_DestroyDescriptorPool(_device, (VkDescriptorPool) _object); case VK_OBJECT_TYPE_PIPELINE_CACHE: return anv_DestroyPipelineCache(_device, (VkPipelineCache) _object); @@ -2011,6 +2010,14 @@ VkResult anv_CreateDescriptorPool( return VK_SUCCESS; } +VkResult anv_DestroyDescriptorPool( + VkDevice _device, + VkDescriptorPool _pool) +{ + /* VkDescriptorPool is a dummy object. */ + return VK_SUCCESS; +} + VkResult anv_ResetDescriptorPool( VkDevice device, VkDescriptorPool descriptorPool)