diff options
author | Chad Versace <[email protected]> | 2015-07-14 10:16:22 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2015-07-14 10:16:22 -0700 |
commit | cb57bff36c5b8f449f4f9738e71d5359d9090fc8 (patch) | |
tree | 84cb51f962efc30962622f0e0db6817c62832ab6 | |
parent | 8ae8e14ba7e5628f4bf3e396fe48f3b46649107b (diff) |
vk/0.132: Add vkDestroyShader()
-rw-r--r-- | include/vulkan/vulkan.h | 5 | ||||
-rw-r--r-- | src/vulkan/device.c | 2 | ||||
-rw-r--r-- | src/vulkan/pipeline.c | 13 |
3 files changed, 20 insertions, 0 deletions
diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 015ab11d890..91d67156126 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -2038,6 +2038,7 @@ typedef VkResult (VKAPI *PFN_vkCreateDepthStencilView)(VkDevice device, const Vk typedef VkResult (VKAPI *PFN_vkCreateShaderModule)(VkDevice device, const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModule* pShaderModule); typedef VkResult (VKAPI *PFN_vkDestroyShaderModule)(VkDevice device, VkShaderModule shaderModule); typedef VkResult (VKAPI *PFN_vkCreateShader)(VkDevice device, const VkShaderCreateInfo* pCreateInfo, VkShader* pShader); +typedef VkResult (VKAPI *PFN_vkDestroyShader)(VkDevice device, VkShader shader); typedef VkResult (VKAPI *PFN_vkCreatePipelineCache)(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, VkPipelineCache* pPipelineCache); typedef size_t (VKAPI *PFN_vkGetPipelineCacheSize)(VkDevice device, VkPipelineCache pipelineCache); typedef VkResult (VKAPI *PFN_vkGetPipelineCacheData)(VkDevice device, VkPipelineCache pipelineCache, void* pData); @@ -2402,6 +2403,10 @@ VkResult VKAPI vkCreateShader( const VkShaderCreateInfo* pCreateInfo, VkShader* pShader); +VkResult VKAPI vkDestroyShader( + VkDevice device, + VkShader shader); + VkResult VKAPI vkCreatePipelineCache( VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 76c44ba507e..2c110726d5f 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -1232,6 +1232,8 @@ VkResult anv_DestroyObject( return anv_DestroyShaderModule(_device, (VkShaderModule) _object); case VK_OBJECT_TYPE_SHADER: + return anv_DestroyShader(_device, (VkShader) _object); + case VK_OBJECT_TYPE_PIPELINE_LAYOUT: case VK_OBJECT_TYPE_SAMPLER: case VK_OBJECT_TYPE_DESCRIPTOR_SET: diff --git a/src/vulkan/pipeline.c b/src/vulkan/pipeline.c index 76a38250701..991ab9f21c2 100644 --- a/src/vulkan/pipeline.c +++ b/src/vulkan/pipeline.c @@ -98,6 +98,19 @@ VkResult anv_CreateShader( return VK_SUCCESS; } +VkResult anv_DestroyShader( + VkDevice _device, + VkShader _shader) +{ + ANV_FROM_HANDLE(anv_device, device, _device); + ANV_FROM_HANDLE(anv_shader, shader, _shader); + + anv_device_free(device, shader); + + return VK_SUCCESS; +} + + VkResult anv_CreatePipelineCache( VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, |