diff options
| author | Tobin Ehlis <tobine@google.com> | 2016-10-12 08:53:27 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-10-13 19:13:33 -0600 |
| commit | 4d0cefced8b90e6f2eb559affdbea480cbbc1848 (patch) | |
| tree | aa29febdc6d29493974ed19f85eba34afb15a6b1 /layers/core_validation.cpp | |
| parent | 63fa7b9509263fe55ade23f04ae7d4836a5bc60f (diff) | |
| download | usermoji-4d0cefced8b90e6f2eb559affdbea480cbbc1848.tar.xz | |
layers:Reduce locking window
Don't need to lock around these decls in DestroyImage/BufferView
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 60c77c4f..33c7a5ba 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -5816,10 +5816,10 @@ static void PostCallRecordDestroyBufferView(layer_data *dev_data, VkBufferView b VKAPI_ATTR void VKAPI_CALL DestroyBufferView(VkDevice device, VkBufferView bufferView, const VkAllocationCallbacks *pAllocator) { layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); - std::unique_lock<std::mutex> lock(global_lock); // Common data objects used pre & post call BUFFER_VIEW_STATE *buffer_view_state = nullptr; VK_OBJECT obj_struct; + std::unique_lock<std::mutex> lock(global_lock); // Validate state before calling down chain, update common data if we'll be calling down chain bool skip = PreCallValidateDestroyBufferView(dev_data, bufferView, &buffer_view_state, &obj_struct); if (!skip) { @@ -5993,10 +5993,10 @@ static void PostCallRecordDestroyImageView(layer_data *dev_data, VkImageView ima VKAPI_ATTR void VKAPI_CALL DestroyImageView(VkDevice device, VkImageView imageView, const VkAllocationCallbacks *pAllocator) { layer_data *dev_data = get_my_data_ptr(get_dispatch_key(device), layer_data_map); - std::unique_lock<std::mutex> lock(global_lock); // Common data objects used pre & post call IMAGE_VIEW_STATE *image_view_state = nullptr; VK_OBJECT obj_struct; + std::unique_lock<std::mutex> lock(global_lock); bool skip = PreCallValidateDestroyImageView(dev_data, imageView, &image_view_state, &obj_struct); if (!skip) { lock.unlock(); |
