diff options
| author | Chris Forbes <chrisforbes@google.com> | 2017-06-01 11:37:58 -0700 |
|---|---|---|
| committer | Chris Forbes <chrisf@ijw.co.nz> | 2017-06-05 11:56:37 -0700 |
| commit | a6b887b976d9f6d099994a9b3e7f17e77809496c (patch) | |
| tree | 657d45cf1b0db7312ba5652eff9964d6ea676705 | |
| parent | 393dedb8a2a860e906527dc10bff51232eeb5869 (diff) | |
| download | usermoji-a6b887b976d9f6d099994a9b3e7f17e77809496c.tar.xz | |
layers: Remove dead device queue tracking from swapchain
| -rw-r--r-- | layers/core_validation.cpp | 1 | ||||
| -rw-r--r-- | layers/swapchain.cpp | 25 | ||||
| -rw-r--r-- | layers/swapchain.h | 3 |
3 files changed, 0 insertions, 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<std::mutex> 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<std::mutex> 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<PFN_vkVoidFunction>(GetDeviceProcAddr)}, {"vkDestroyDevice", reinterpret_cast<PFN_vkVoidFunction>(DestroyDevice)}, - {"vkGetDeviceQueue", reinterpret_cast<PFN_vkVoidFunction>(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<VkSwapchainKHR, SwpSwapchain *> swapchains; - - // When vkGetDeviceQueue is called, the VkQueue's are remembered: - std::unordered_map<VkQueue, SwpQueue *> queues; }; // Create one of these for each VkImage within a VkSwapchainKHR: |
