diff options
author | Chad Versace <[email protected]> | 2015-07-14 10:12:10 -0700 |
---|---|---|
committer | Chad Versace <[email protected]> | 2015-07-14 10:13:09 -0700 |
commit | 8ae8e14ba7e5628f4bf3e396fe48f3b46649107b (patch) | |
tree | 0f0ceee71670ca77c82a3efa3fad4d00a63860e8 | |
parent | dd67c134ade2fe7ee7b4a4db7a68f6d89560f37e (diff) |
vk/0.132: Add vkDestroyShaderModule()
-rw-r--r-- | include/vulkan/vulkan.h | 5 | ||||
-rw-r--r-- | src/vulkan/device.c | 4 | ||||
-rw-r--r-- | src/vulkan/pipeline.c | 12 |
3 files changed, 20 insertions, 1 deletions
diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index c4ab8c7da2a..015ab11d890 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -2036,6 +2036,7 @@ typedef VkResult (VKAPI *PFN_vkCreateImageView)(VkDevice device, const VkImageVi typedef VkResult (VKAPI *PFN_vkCreateColorAttachmentView)(VkDevice device, const VkColorAttachmentViewCreateInfo* pCreateInfo, VkColorAttachmentView* pView); typedef VkResult (VKAPI *PFN_vkCreateDepthStencilView)(VkDevice device, const VkDepthStencilViewCreateInfo* pCreateInfo, VkDepthStencilView* pView); 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_vkCreatePipelineCache)(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, VkPipelineCache* pPipelineCache); typedef size_t (VKAPI *PFN_vkGetPipelineCacheSize)(VkDevice device, VkPipelineCache pipelineCache); @@ -2392,6 +2393,10 @@ VkResult VKAPI vkCreateShaderModule( const VkShaderModuleCreateInfo* pCreateInfo, VkShaderModule* pShaderModule); +VkResult VKAPI vkDestroyShaderModule( + VkDevice device, + VkShaderModule shaderModule); + VkResult VKAPI vkCreateShader( VkDevice device, const VkShaderCreateInfo* pCreateInfo, diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 0256b66791f..76c44ba507e 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -1228,8 +1228,10 @@ VkResult anv_DestroyObject( case VK_OBJECT_TYPE_BUFFER: return anv_DestroyBuffer(_device, (VkBuffer) _object); - case VK_OBJECT_TYPE_SHADER: case VK_OBJECT_TYPE_SHADER_MODULE: + return anv_DestroyShaderModule(_device, (VkShaderModule) _object); + + case VK_OBJECT_TYPE_SHADER: 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 6396e6cc0f6..76a38250701 100644 --- a/src/vulkan/pipeline.c +++ b/src/vulkan/pipeline.c @@ -55,6 +55,18 @@ VkResult anv_CreateShaderModule( return VK_SUCCESS; } +VkResult anv_DestroyShaderModule( + VkDevice _device, + VkShaderModule _module) +{ + ANV_FROM_HANDLE(anv_device, device, _device); + ANV_FROM_HANDLE(anv_shader_module, module, _module); + + anv_device_free(device, module); + + return VK_SUCCESS; +} + VkResult anv_CreateShader( VkDevice _device, const VkShaderCreateInfo* pCreateInfo, |