vk/0.132: Add vkDestroyPipelineLayout()
authorChad Versace <chad.versace@intel.com>
Tue, 14 Jul 2015 17:28:41 +0000 (10:28 -0700)
committerChad Versace <chad.versace@intel.com>
Tue, 14 Jul 2015 17:29:47 +0000 (10:29 -0700)
include/vulkan/vulkan.h
src/vulkan/device.c
src/vulkan/pipeline.c

index bbb75001d45ae69acad8eab12fa1ed78736620dd..2d1dff1144123230b0d475db21fe73041f8c7a5a 100644 (file)
@@ -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,
index 43724641c0866f6a6c1885a67fa73e65280ecce2..7c896cdd20ca94efce8de22ec2ae9e76500d7049 100644 (file)
@@ -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:
index 3d67a3a1b6d897b43df3a4d41d1663379b001303..42a900d7ab07fe12945aff1006c25957bf1f476a 100644 (file)
@@ -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;
+}