From 7ee1c6d9619fa9dc66939ccd8756c393a18117f8 Mon Sep 17 00:00:00 2001 From: Mike Stroyan Date: Mon, 8 Feb 2016 10:27:55 -0700 Subject: layers: lock use of threading layer cmd pool map Access to command_pool_map data structure in threading validation layer needs a mutex. --- layers/threading.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'layers/threading.cpp') diff --git a/layers/threading.cpp b/layers/threading.cpp index fcdd38b1..db59aa95 100644 --- a/layers/threading.cpp +++ b/layers/threading.cpp @@ -357,7 +357,9 @@ VkResult VKAPI_CALL vkAllocateCommandBuffers( // Record mapping from command buffer to command pool if (VK_SUCCESS == result) { for (int index=0;indexcommandBufferCount;index++) { + loader_platform_thread_lock_mutex(&threadingLock); command_pool_map[pCommandBuffers[index]] = pAllocateInfo->commandPool; + loader_platform_thread_unlock_mutex(&threadingLock); } } @@ -385,7 +387,9 @@ void VKAPI_CALL vkFreeCommandBuffers( finishWriteObject(my_data, commandPool); for (int index=0;index