From a6841989357d23b7736065a7d34e673f8831aae9 Mon Sep 17 00:00:00 2001 From: Chad Versace Date: Tue, 14 Jul 2015 10:28:41 -0700 Subject: [PATCH] vk/0.132: Add vkDestroyPipelineLayout() --- include/vulkan/vulkan.h | 5 +++++ src/vulkan/device.c | 2 ++ src/vulkan/pipeline.c | 12 ++++++++++++ 3 files changed, 19 insertions(+) diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index bbb75001d45..2d1dff11441 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -2048,6 +2048,7 @@ typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipelines)(VkDevice device, VkPipel typedef VkResult (VKAPI *PFN_vkCreateComputePipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, const VkComputePipelineCreateInfo* pCreateInfos, VkPipeline* pPipelines); typedef VkResult (VKAPI *PFN_vkDestroyPipeline)(VkDevice device, VkPipeline pipeline); 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_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); @@ -2456,6 +2457,10 @@ VkResult VKAPI vkCreatePipelineLayout( const VkPipelineLayoutCreateInfo* pCreateInfo, VkPipelineLayout* pPipelineLayout); +VkResult VKAPI vkDestroyPipelineLayout( + VkDevice device, + VkPipelineLayout pipelineLayout); + VkResult VKAPI vkCreateSampler( VkDevice device, const VkSamplerCreateInfo* pCreateInfo, diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 43724641c08..7c896cdd20c 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -1237,6 +1237,8 @@ VkResult anv_DestroyObject( return anv_DestroyShader(_device, (VkShader) _object); case VK_OBJECT_TYPE_PIPELINE_LAYOUT: + return anv_DestroyPipelineLayout(_device, (VkPipelineLayout) _object); + case VK_OBJECT_TYPE_SAMPLER: case VK_OBJECT_TYPE_DESCRIPTOR_SET: case VK_OBJECT_TYPE_DESCRIPTOR_SET_LAYOUT: diff --git a/src/vulkan/pipeline.c b/src/vulkan/pipeline.c index 3d67a3a1b6d..42a900d7ab0 100644 --- a/src/vulkan/pipeline.c +++ b/src/vulkan/pipeline.c @@ -955,3 +955,15 @@ VkResult anv_CreatePipelineLayout( return VK_SUCCESS; } + +VkResult anv_DestroyPipelineLayout( + VkDevice _device, + VkPipelineLayout _pipelineLayout) +{ + ANV_FROM_HANDLE(anv_device, device, _device); + ANV_FROM_HANDLE(anv_pipeline_layout, pipeline_layout, _pipelineLayout); + + anv_device_free(device, pipeline_layout); + + return VK_SUCCESS; +} -- 2.30.2