aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2016-10-05 21:50:14 -0600
committerTobin Ehlis <tobine@google.com>2016-10-06 07:38:58 -0600
commit8ce76667f3ad2a25adc25c3d767f347cc6f8f6dd (patch)
tree42da4c06f581c1556b412b88c397b24a8a4a3afb /layers/core_validation.cpp
parentad1002000e8b2d457bf2351ecd2832f8bb1ad56f (diff)
downloadusermoji-8ce76667f3ad2a25adc25c3d767f347cc6f8f6dd.tar.xz
layers: Fix buffer_view destroy ordering
Don't destroy buffer_view from map until after invalidating bound cmd buffers.
Diffstat (limited to 'layers/core_validation.cpp')
-rw-r--r--layers/core_validation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 86f1a8aa..7e822108 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -5804,9 +5804,9 @@ static bool PreCallValidateDestroyBufferView(layer_data *dev_data, VkBufferView
static void PostCallRecordDestroyBufferView(layer_data *dev_data, VkBufferView buffer_view, BUFFER_VIEW_STATE *buffer_view_state,
VK_OBJECT obj_struct) {
- dev_data->bufferViewMap.erase(buffer_view);
// Any bound cmd buffers are now invalid
invalidateCommandBuffers(buffer_view_state->cb_bindings, obj_struct);
+ dev_data->bufferViewMap.erase(buffer_view);
}
VKAPI_ATTR void VKAPI_CALL