From af7f549a72cdf48ba7a438dce80f063819e0c093 Mon Sep 17 00:00:00 2001 From: Courtney Goeltzenleuchter Date: Fri, 16 Oct 2015 09:58:26 -0600 Subject: [PATCH] bug-14580: add dataSize to vkGetPipelineCacheData commit: aaa2ae0 --- icd/nulldrv/nulldrv.c | 1 + include/vulkan.h | 3 ++- layers/draw_state.cpp | 3 ++- layers/param_checker.cpp | 6 ++++-- loader/trampoline.c | 4 ++-- vulkan.py | 1 + 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/icd/nulldrv/nulldrv.c b/icd/nulldrv/nulldrv.c index 5126f3e..8dc8dc4 100644 --- a/icd/nulldrv/nulldrv.c +++ b/icd/nulldrv/nulldrv.c @@ -1750,6 +1750,7 @@ ICD_EXPORT size_t VKAPI vkGetPipelineCacheSize( ICD_EXPORT VkResult VKAPI vkGetPipelineCacheData( VkDevice device, VkPipelineCache pipelineCache, + size_t dataSize, void* pData) { NULLDRV_LOG_FUNC; diff --git a/include/vulkan.h b/include/vulkan.h index 05286c1..5fd2b05 100644 --- a/include/vulkan.h +++ b/include/vulkan.h @@ -2167,7 +2167,7 @@ typedef void (VKAPI *PFN_vkDestroyShader)(VkDevice device, VkShader shader); typedef VkResult (VKAPI *PFN_vkCreatePipelineCache)(VkDevice device, const VkPipelineCacheCreateInfo* pCreateInfo, VkPipelineCache* pPipelineCache); typedef void (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_vkGetPipelineCacheData)(VkDevice device, VkPipelineCache pipelineCache, size_t dataSize, void* pData); typedef VkResult (VKAPI *PFN_vkMergePipelineCaches)(VkDevice device, VkPipelineCache destCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches); typedef VkResult (VKAPI *PFN_vkCreateGraphicsPipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, const VkGraphicsPipelineCreateInfo* pCreateInfos, VkPipeline* pPipelines); typedef VkResult (VKAPI *PFN_vkCreateComputePipelines)(VkDevice device, VkPipelineCache pipelineCache, uint32_t count, const VkComputePipelineCreateInfo* pCreateInfos, VkPipeline* pPipelines); @@ -2589,6 +2589,7 @@ size_t VKAPI vkGetPipelineCacheSize( VkResult VKAPI vkGetPipelineCacheData( VkDevice device, VkPipelineCache pipelineCache, + size_t dataSize, void* pData); VkResult VKAPI vkMergePipelineCaches( diff --git a/layers/draw_state.cpp b/layers/draw_state.cpp index d873785..7a33ffb 100755 --- a/layers/draw_state.cpp +++ b/layers/draw_state.cpp @@ -1735,10 +1735,11 @@ size_t VKAPI vkGetPipelineCacheSize( VkResult VKAPI vkGetPipelineCacheData( VkDevice device, VkPipelineCache pipelineCache, + size_t dataSize, void* pData) { layer_data* dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); - VkResult result = dev_data->device_dispatch_table->GetPipelineCacheData(device, pipelineCache, pData); + VkResult result = dev_data->device_dispatch_table->GetPipelineCacheData(device, pipelineCache, dataSize, pData); return result; } diff --git a/layers/param_checker.cpp b/layers/param_checker.cpp index f906fb3..4595325 100644 --- a/layers/param_checker.cpp +++ b/layers/param_checker.cpp @@ -4008,6 +4008,7 @@ VK_LAYER_EXPORT size_t VKAPI vkGetPipelineCacheSize( bool PostGetPipelineCacheData( VkDevice device, VkPipelineCache pipelineCache, + size_t dataSize, void* pData, VkResult result) { @@ -4030,11 +4031,12 @@ bool PostGetPipelineCacheData( VK_LAYER_EXPORT VkResult VKAPI vkGetPipelineCacheData( VkDevice device, VkPipelineCache pipelineCache, + size_t dataSize, void* pData) { - VkResult result = get_dispatch_table(pc_device_table_map, device)->GetPipelineCacheData(device, pipelineCache, pData); + VkResult result = get_dispatch_table(pc_device_table_map, device)->GetPipelineCacheData(device, pipelineCache, dataSize, pData); - PostGetPipelineCacheData(device, pipelineCache, pData, result); + PostGetPipelineCacheData(device, pipelineCache, dataSize, pData, result); return result; } diff --git a/loader/trampoline.c b/loader/trampoline.c index c7a6394..b2c00c1 100644 --- a/loader/trampoline.c +++ b/loader/trampoline.c @@ -827,13 +827,13 @@ LOADER_EXPORT size_t VKAPI vkGetPipelineCacheSize(VkDevice device, VkPipelineCac return disp->GetPipelineCacheSize(device, pipelineCache); } -LOADER_EXPORT VkResult VKAPI vkGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, void* pData) +LOADER_EXPORT VkResult VKAPI vkGetPipelineCacheData(VkDevice device, VkPipelineCache pipelineCache, size_t dataSize, void* pData) { const VkLayerDispatchTable *disp; disp = loader_get_dispatch(device); - return disp->GetPipelineCacheData(device, pipelineCache, pData); + return disp->GetPipelineCacheData(device, pipelineCache, dataSize, pData); } LOADER_EXPORT VkResult VKAPI vkMergePipelineCaches(VkDevice device, VkPipelineCache destCache, uint32_t srcCacheCount, const VkPipelineCache* pSrcCaches) diff --git a/vulkan.py b/vulkan.py index 962b17c..c58416a 100755 --- a/vulkan.py +++ b/vulkan.py @@ -557,6 +557,7 @@ core = Extension( Proto("VkResult", "GetPipelineCacheData", [Param("VkDevice", "device"), Param("VkPipelineCache", "pipelineCache"), + Param("size_t", "dataSize"), Param("void*", "pData")]), Proto("VkResult", "MergePipelineCaches", -- 2.7.4