From 4ae75644b238b63d0e8f8b7d21cfd51f45b2c943 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Tue, 2 May 2017 18:18:01 -0700 Subject: layers: Move UO helpers to header --- layers/unique_objects.cpp | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'layers/unique_objects.cpp') diff --git a/layers/unique_objects.cpp b/layers/unique_objects.cpp index abf5a3cb..f7f61f01 100644 --- a/layers/unique_objects.cpp +++ b/layers/unique_objects.cpp @@ -316,23 +316,6 @@ VKAPI_ATTR PFN_vkVoidFunction VKAPI_CALL GetPhysicalDeviceProcAddr(VkInstance in return disp_table->GetPhysicalDeviceProcAddr(instance, funcName); } -/* Unwrap a handle. */ -// must hold lock! -template -static HandleType Unwrap(MapType *layer_data, HandleType wrappedHandle) { - // TODO: don't use operator[] here. - return (HandleType)layer_data->unique_id_mapping[reinterpret_cast(wrappedHandle)]; -} - -/* Wrap a newly created handle with a new unique ID, and return the new ID. */ -// must hold lock! -template -static HandleType WrapNew(MapType *layer_data, HandleType newlyCreatedHandle) { - auto unique_id = global_unique_id++; - layer_data->unique_id_mapping[unique_id] = reinterpret_cast(newlyCreatedHandle); - return (HandleType)unique_id; -} - VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines(VkDevice device, VkPipelineCache pipelineCache, uint32_t createInfoCount, const VkComputePipelineCreateInfo *pCreateInfos, const VkAllocationCallbacks *pAllocator, VkPipeline *pPipelines) { -- cgit v1.2.3