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

index 91d67156126ff731cc07f18d439871ef54044127..35d8e45888d360625366c264f70f03e69dc5d58c 100644 (file)
@@ -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);
index 2c110726d5f6bd6f08f65ef5d3289f721a4c1446..599475135e7dddfcfa4696ef61b73821989a47e3 100644 (file)
@@ -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);
 
index 991ab9f21c298c5285849253a6cab7c5b42dd6db..d21af0ff8b4291f8c5b059d1ce90a558f4e4f608 100644 (file)
@@ -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)