From: Chad Versace Date: Tue, 14 Jul 2015 17:19:27 +0000 (-0700) Subject: vk/0.132: Add vkDestroyPipelineCache() X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=114015321eb3998e2814687e3584994bc061a33b;p=mesa.git vk/0.132: Add vkDestroyPipelineCache() --- diff --git a/include/vulkan/vulkan.h b/include/vulkan/vulkan.h index 91d67156126..35d8e45888d 100644 --- a/include/vulkan/vulkan.h +++ b/include/vulkan/vulkan.h @@ -2040,6 +2040,7 @@ typedef VkResult (VKAPI *PFN_vkDestroyShaderModule)(VkDevice device, VkShaderMod 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 VkResult (VKAPI *PFN_vkDestroyPipelineCache)(VkDevice device, VkPipelineCache pipelineCache); typedef size_t (VKAPI *PFN_vkGetPipelineCacheSize)(VkDevice device, VkPipelineCache pipelineCache); typedef VkResult (VKAPI *PFN_vkGetPipelineCacheData)(VkDevice device, VkPipelineCache pipelineCache, void* pData); typedef VkResult (VKAPI *PFN_vkMergePipelineCaches)(VkDevice device, VkPipelineCache destCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches); @@ -2412,6 +2413,10 @@ VkResult VKAPI vkCreatePipelineCache( const VkPipelineCacheCreateInfo* pCreateInfo, VkPipelineCache* pPipelineCache); +VkResult VKAPI vkDestroyPipelineCache( + VkDevice device, + VkPipelineCache pipelineCache); + size_t VKAPI vkGetPipelineCacheSize( VkDevice device, VkPipelineCache pipelineCache); diff --git a/src/vulkan/device.c b/src/vulkan/device.c index 2c110726d5f..599475135e7 100644 --- a/src/vulkan/device.c +++ b/src/vulkan/device.c @@ -1206,10 +1206,12 @@ VkResult anv_DestroyObject( return anv_FreeMemory(_device, (VkDeviceMemory) _object); case VK_OBJECT_TYPE_DESCRIPTOR_POOL: - case VK_OBJECT_TYPE_PIPELINE_CACHE: /* These are just dummys anyway, so we don't need to destroy them */ return VK_SUCCESS; + case VK_OBJECT_TYPE_PIPELINE_CACHE: + return anv_DestroyPipelineCache(_device, (VkPipelineCache) _object); + case VK_OBJECT_TYPE_BUFFER_VIEW: return anv_DestroyBufferView(_device, _object); diff --git a/src/vulkan/pipeline.c b/src/vulkan/pipeline.c index 991ab9f21c2..d21af0ff8b4 100644 --- a/src/vulkan/pipeline.c +++ b/src/vulkan/pipeline.c @@ -121,6 +121,14 @@ VkResult anv_CreatePipelineCache( stub_return(VK_SUCCESS); } +VkResult anv_DestroyPipelineCache( + VkDevice _device, + VkPipelineCache _cache) +{ + /* VkPipelineCache is a dummy object. */ + return VK_SUCCESS; +} + size_t anv_GetPipelineCacheSize( VkDevice device, VkPipelineCache pipelineCache)