From a6b887b976d9f6d099994a9b3e7f17e77809496c Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Thu, 1 Jun 2017 11:37:58 -0700 Subject: layers: Remove dead device queue tracking from swapchain --- layers/core_validation.cpp | 1 - layers/swapchain.cpp | 25 ------------------------- layers/swapchain.h | 3 --- 3 files changed, 29 deletions(-) diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 0c7a3363..e28caff6 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -10386,7 +10386,6 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchai // This should never happen and is checked by param checker. if (!pCount) return result; std::lock_guard lock(global_lock); - const size_t count = *pCount; auto swapchain_node = GetSwapchainNode(dev_data, swapchain); for (uint32_t i = 0; i < *pCount; ++i) { IMAGE_LAYOUT_NODE image_layout_node; diff --git a/layers/swapchain.cpp b/layers/swapchain.cpp index 4bff5948..308276da 100644 --- a/layers/swapchain.cpp +++ b/layers/swapchain.cpp @@ -875,30 +875,6 @@ VKAPI_ATTR VkResult VKAPI_CALL GetSwapchainImagesKHR(VkDevice device, VkSwapchai return VK_ERROR_VALIDATION_FAILED_EXT; } -VKAPI_ATTR void VKAPI_CALL GetDeviceQueue(VkDevice device, uint32_t queueFamilyIndex, uint32_t queueIndex, VkQueue *pQueue) { - bool skip_call = false; - layer_data *my_data = GetLayerDataPtr(get_dispatch_key(device), layer_data_map); - - if (!skip_call) { - // Call down the call chain: - my_data->device_dispatch_table->GetDeviceQueue(device, queueFamilyIndex, queueIndex, pQueue); - - // Remember the queue's handle, and link it to the device: - std::lock_guard lock(global_lock); - SwpDevice *pDevice = NULL; - { - auto it = my_data->deviceMap.find(device); - pDevice = (it == my_data->deviceMap.end()) ? NULL : &it->second; - } - my_data->queueMap[&pQueue].queue = *pQueue; - if (pDevice) { - pDevice->queues[*pQueue] = &my_data->queueMap[*pQueue]; - } - my_data->queueMap[&pQueue].pDevice = pDevice; - my_data->queueMap[&pQueue].queueFamilyIndex = queueFamilyIndex; - } -} - VKAPI_ATTR VkResult VKAPI_CALL CreateDebugReportCallbackEXT(VkInstance instance, const VkDebugReportCallbackCreateInfoEXT *pCreateInfo, const VkAllocationCallbacks *pAllocator, @@ -1093,7 +1069,6 @@ static PFN_vkVoidFunction intercept_core_device_command(const char *name) { } core_device_commands[] = { {"vkGetDeviceProcAddr", reinterpret_cast(GetDeviceProcAddr)}, {"vkDestroyDevice", reinterpret_cast(DestroyDevice)}, - {"vkGetDeviceQueue", reinterpret_cast(GetDeviceQueue)}, }; for (size_t i = 0; i < ARRAY_SIZE(core_device_commands); i++) { diff --git a/layers/swapchain.h b/layers/swapchain.h index 0bb5791f..5949a3f3 100644 --- a/layers/swapchain.h +++ b/layers/swapchain.h @@ -137,9 +137,6 @@ struct SwpDevice { // When vkCreateSwapchainKHR is called, the VkSwapchainKHR's are // remembered: std::unordered_map swapchains; - - // When vkGetDeviceQueue is called, the VkQueue's are remembered: - std::unordered_map queues; }; // Create one of these for each VkImage within a VkSwapchainKHR: -- cgit v1.2.3