summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/vulkan/vulkan.h5
-rw-r--r--src/vulkan/device.c2
-rw-r--r--src/vulkan/pipeline.c12
3 files changed, 19 insertions, 0 deletions
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;
+}