diff options
| author | Mark Lobodzinski <mark@lunarg.com> | 2015-11-19 08:31:31 -0700 |
|---|---|---|
| committer | Mark Lobodzinski <mark@lunarg.com> | 2015-11-19 08:35:25 -0700 |
| commit | ef0a997e282030fbd094e91fedea7af48ff7ccf9 (patch) | |
| tree | 459ce8d4eae60a3cf503dc7f275983ef1bcba3cf | |
| parent | 85038928d61a50fc69dc8045c3e704ae8e72d989 (diff) | |
| download | usermoji-ef0a997e282030fbd094e91fedea7af48ff7ccf9.tar.xz | |
layers: Fix windows build errors in MemTracker
| -rw-r--r-- | layers/mem_tracker.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/layers/mem_tracker.cpp b/layers/mem_tracker.cpp index 46b697fa..52be170c 100644 --- a/layers/mem_tracker.cpp +++ b/layers/mem_tracker.cpp @@ -1871,13 +1871,15 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkCreateCommandPool( VkCommandPool* pCommandPool) { layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); - my_data->device_dispatch_table->CreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool); + VkResult result = my_data->device_dispatch_table->CreateCommandPool(device, pCreateInfo, pAllocator, pCommandPool); loader_platform_thread_lock_mutex(&globalLock); + // Add cmd pool to map my_data->commandPoolMap[*pCommandPool].createFlags = pCreateInfo->flags; loader_platform_thread_unlock_mutex(&globalLock); - return VK_SUCCESS; + + return result; } VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkDestroyCommandPool( @@ -1922,6 +1924,7 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandPool( layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); VkBool32 commandBufferComplete = VK_FALSE; VkBool32 skipCall = VK_FALSE; + VkResult result = VK_ERROR_VALIDATION_FAILED; // TODO: Check the commandPool's flags to see if reset is available for this pool. @@ -1938,7 +1941,12 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkResetCommandPool( skipCall |= clear_cmd_buf_and_mem_references(my_data, (*it)); } } - return VK_SUCCESS; + + if (VK_FALSE == skipCall) { + result = my_data->device_dispatch_table->ResetCommandPool(device, commandPool, flags); + } + + return result; } VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkBeginCommandBuffer( |
