diff options
| author | Tobin Ehlis <tobine@google.com> | 2016-10-12 07:25:59 -0600 |
|---|---|---|
| committer | Chris Forbes <chrisforbes@google.com> | 2016-10-14 16:40:33 +1300 |
| commit | f73836a7f1faeafef16db18da16ecaa336407315 (patch) | |
| tree | 2dae6a6a6e3529a11c8630e1c6f954411f0f0523 | |
| parent | 439daddb93c746ca53220d4aa6af0068593978d9 (diff) | |
| download | usermoji-f73836a7f1faeafef16db18da16ecaa336407315.tar.xz | |
layers:Kill old MTMERGE defines
Just a couple of these lingering that we can now axe
| -rw-r--r-- | layers/core_validation.cpp | 26 | ||||
| -rw-r--r-- | layers/core_validation.h | 6 |
2 files changed, 8 insertions, 24 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 10fddb0e..7f007b6e 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -27,9 +27,6 @@ // Allow use of STL min and max functions in Windows #define NOMINMAX -// Turn on mem_tracker merged code -#define MTMERGESOURCE 1 - #include <SPIRV/spirv.hpp> #include <algorithm> #include <assert.h> @@ -4565,6 +4562,7 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateDevice(VkPhysicalDevice gpu, const VkDevice // prototype VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCallbacks *pAllocator) { // TODOSC : Shouldn't need any customization here + bool skip = false; dispatch_key key = get_dispatch_key(device); layer_data *dev_data = get_my_data_ptr(key, layer_data_map); // Free all the memory @@ -4588,10 +4586,6 @@ VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCall dev_data->bufferMap.clear(); // Queues persist until device is destroyed dev_data->queueMap.clear(); - lock.unlock(); -#if MTMERGESOURCE - bool skip_call = false; - lock.lock(); log_msg(dev_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, (uint64_t)device, __LINE__, MEMTRACK_NONE, "MEM", "Printing List details prior to vkDestroyDevice()"); log_msg(dev_data->report_data, VK_DEBUG_REPORT_INFORMATION_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, @@ -4605,12 +4599,11 @@ VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCall pInfo = (*ii).second.get(); if (pInfo->alloc_info.allocationSize != 0) { // Valid Usage: All child objects created on device must have been destroyed prior to destroying device - skip_call |= - log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, - (uint64_t)pInfo->mem, __LINE__, MEMTRACK_MEMORY_LEAK, "MEM", - "Mem Object 0x%" PRIx64 " has not been freed. You should clean up this memory by calling " - "vkFreeMemory(0x%" PRIx64 ") prior to vkDestroyDevice().", - (uint64_t)(pInfo->mem), (uint64_t)(pInfo->mem)); + skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_MEMORY_EXT, + (uint64_t)pInfo->mem, __LINE__, MEMTRACK_MEMORY_LEAK, "MEM", + "Mem Object 0x%" PRIx64 " has not been freed. You should clean up this memory by calling " + "vkFreeMemory(0x%" PRIx64 ") prior to vkDestroyDevice().", + (uint64_t)(pInfo->mem), (uint64_t)(pInfo->mem)); } } } @@ -4620,13 +4613,10 @@ VKAPI_ATTR void VKAPI_CALL DestroyDevice(VkDevice device, const VkAllocationCall #if DISPATCH_MAP_DEBUG fprintf(stderr, "Device: 0x%p, key: 0x%p\n", device, key); #endif - if (!skip_call) { + if (!skip) { dev_data->dispatch_table.DestroyDevice(device, pAllocator); + layer_data_map.erase(key); } -#else - dev_data->dispatch_table.DestroyDevice(device, pAllocator); -#endif - layer_data_map.erase(key); } static const VkExtensionProperties instance_extensions[] = {{VK_EXT_DEBUG_REPORT_EXTENSION_NAME, VK_EXT_DEBUG_REPORT_SPEC_VERSION}}; diff --git a/layers/core_validation.h b/layers/core_validation.h index 9138af75..288bfac7 100644 --- a/layers/core_validation.h +++ b/layers/core_validation.h @@ -44,9 +44,6 @@ #endif #endif -// Enable mem_tracker merged code -#define MTMERGE 1 - #pragma once #include "core_validation_error_enums.h" #include "vk_validation_error_messages.h" @@ -86,8 +83,6 @@ struct CHECK_DISABLED { bool update_descriptor_sets; // Skip validation prior to vkUpdateDescriptorSets() }; -#if MTMERGE - /* * MTMTODO : Update this comment * Data Structure overview @@ -124,7 +119,6 @@ struct MT_FB_ATTACHMENT_INFO { VkImage image; VkDeviceMemory mem; }; -#endif struct GENERIC_HEADER { VkStructureType sType; |
