diff options
| author | Tony Barbour <tony@LunarG.com> | 2016-03-17 11:18:47 -0600 |
|---|---|---|
| committer | Tony Barbour <tony@LunarG.com> | 2016-03-17 11:18:47 -0600 |
| commit | 343b17142bba64e5dbafa8e3319c91058b5fc934 (patch) | |
| tree | 3e78135a66538bd90192898a40b93fde5c1a0f1e /layers/core_validation.cpp | |
| parent | dc80f6903a3d01493a4cc087159c033c4426b0b1 (diff) | |
| download | usermoji-343b17142bba64e5dbafa8e3319c91058b5fc934.tar.xz | |
layers: Lock around image and buffer range erases in core validation
Change-Id: Id975474ef331369e5dc57a24ea6051253fb657cf
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 516ff248..aeba8c8d 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -5379,6 +5379,7 @@ VK_LAYER_EXPORT VKAPI_ATTR VkResult VKAPI_CALL vkAllocateMemory(VkDevice device, VK_LAYER_EXPORT VKAPI_ATTR void VKAPI_CALL vkFreeMemory(VkDevice device, VkDeviceMemory mem, const VkAllocationCallbacks *pAllocator) { layer_data *my_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); + loader_platform_thread_lock_mutex(&globalLock); my_data->bufferRanges.erase(mem); my_data->imageRanges.erase(mem); @@ -5389,7 +5390,6 @@ vkFreeMemory(VkDevice device, VkDeviceMemory mem, const VkAllocationCallbacks *p // buffers (on host or device) for anything other than destroying those objects will result in // undefined behavior. - loader_platform_thread_lock_mutex(&globalLock); freeMemObjInfo(my_data, device, mem, VK_FALSE); print_mem_list(my_data, device); printCBList(my_data, device); |
