From: Chad Versace Date: Tue, 14 Jul 2015 17:34:00 +0000 (-0700) Subject: vk/0.132: Add vkDestroySampler() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ec5e2f4992a5ddd7aeb4385324fb4d674d168d36;p=mesa.git vk/0.132: Add vkDestroySampler() --- diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 2d1dff11441..1cc4d8c2988 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -2050,6 +2050,7 @@ typedef VkResult (VKAPI *PFN_vkDestroyPipeline)(VkDevice device, VkPipeline pipe typedef VkResult (VKAPI *PFN_vkCreatePipelineLayout)(VkDevice device, const VkPipelineLayoutCreateInfo* pCreateInfo, VkPipelineLayout* pPipelineLayout); typedef VkResult (VKAPI *PFN_vkDestroyPipelineLayout)(VkDevice device, VkPipelineLayout pipelineLayout); 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_vkCreateDescriptorPool)(VkDevice device, VkDescriptorPoolUsage poolUsage, uint32_t maxSets, const VkDescriptorPoolCreateInfo* pCreateInfo, VkDescriptorPool* pDescriptorPool); typedef VkResult (VKAPI *PFN_vkResetDescriptorPool)(VkDevice device, VkDescriptorPool descriptorPool); @@ -2466,6 +2467,10 @@ VkResult VKAPI vkCreateSampler( const VkSamplerCreateInfo* pCreateInfo, VkSampler* pSampler); +VkResult VKAPI vkDestroySampler( + VkDevice device, + VkSampler sampler); + VkResult VKAPI vkCreateDescriptorSetLayout( VkDevice device, const VkDescriptorSetLayoutCreateInfo* pCreateInfo, diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 7c896cdd20c..b42d6f4f3b4 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -1240,6 +1240,8 @@ VkResult anv_DestroyObject( return anv_DestroyPipelineLayout(_device, (VkPipelineLayout) _object); case VK_OBJECT_TYPE_SAMPLER: + return anv_DestroySampler(_device, (VkSampler) _object); + case VK_OBJECT_TYPE_DESCRIPTOR_SET: case VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT: case VK_OBJECT_TYPE_DYNAMIC_RS_STATE: @@ -1818,6 +1820,18 @@ VkResult anv_CreateSampler( return VK_SUCCESS; } +VkResult anv_DestroySampler( + VkDevice _device, + VkSampler _sampler) +{ + ANV_FROM_HANDLE(anv_device, device, _device); + ANV_FROM_HANDLE(anv_sampler, sampler, _sampler); + + anv_device_free(device, sampler); + + return VK_SUCCESS; +} + // Descriptor set functions VkResult anv_CreateDescriptorSetLayout(