From: Chad Versace Date: Tue, 14 Jul 2015 17:36:49 +0000 (-0700) Subject: vk/0.132: Add vkDestroyDescriptorSetLayout() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f925ea31e7085dd7a873103fe8e485c602235935;p=mesa.git vk/0.132: Add vkDestroyDescriptorSetLayout() --- diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 1cc4d8c2988..33885c09abc 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -2052,6 +2052,7 @@ typedef VkResult (VKAPI *PFN_vkDestroyPipelineLayout)(VkDevice device, VkPipelin typedef VkResult (VKAPI *PFN_vkCreateSampler)(VkDevice device, const VkSamplerCreateInfo* pCreateInfo, VkSampler* pSampler); typedef VkResult (VKAPI *PFN_vkDestroySampler)(VkDevice device, VkSampler sampler); 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_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); @@ -2476,6 +2477,10 @@ VkResult VKAPI vkCreateDescriptorSetLayout( const VkDescriptorSetLayoutCreateInfo* pCreateInfo, VkDescriptorSetLayout* pSetLayout); +VkResult VKAPI vkDestroyDescriptorSetLayout( + VkDevice device, + VkDescriptorSetLayout descriptorSetLayout); + VkResult VKAPI vkCreateDescriptorPool( VkDevice device, VkDescriptorPoolUsage poolUsage, diff --git a/src/vulkan/device.c b/src/vulkan/device.c index b42d6f4f3b4..e54920efcf6 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -1242,8 +1242,10 @@ VkResult anv_DestroyObject( case VK_OBJECT_TYPE_SAMPLER: return anv_DestroySampler(_device, (VkSampler) _object); - case VK_OBJECT_TYPE_DESCRIPTOR_SET: case VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT: + return anv_DestroyDescriptorSetLayout(_device, (VkDescriptorSetLayout) _object); + + case VK_OBJECT_TYPE_DESCRIPTOR_SET: case VK_OBJECT_TYPE_DYNAMIC_RS_STATE: case VK_OBJECT_TYPE_DYNAMIC_CB_STATE: case VK_OBJECT_TYPE_DYNAMIC_DS_STATE: @@ -1985,6 +1987,18 @@ VkResult anv_CreateDescriptorSetLayout( return VK_SUCCESS; } +VkResult anv_DestroyDescriptorSetLayout( + VkDevice _device, + VkDescriptorSetLayout _set_layout) +{ + ANV_FROM_HANDLE(anv_device, device, _device); + ANV_FROM_HANDLE(anv_descriptor_set_layout, set_layout, _set_layout); + + anv_device_free(device, set_layout); + + return VK_SUCCESS; +} + VkResult anv_CreateDescriptorPool( VkDevice device, VkDescriptorPoolUsage poolUsage,