aboutsummaryrefslogtreecommitdiff
path: root/layers/core_validation.cpp
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2016-11-21 15:23:51 -0700
committerTobin Ehlis <tobine@google.com>2016-11-22 13:20:46 -0700
commit5c2c60b860571d9e6e4f0157d07c52458d0d1c5e (patch)
tree1063546c89a2ee5634c34edb561216d27f6afe8f /layers/core_validation.cpp
parent0d0c19cb4900113ea83929e5e19a841f732a37fe (diff)
downloadusermoji-5c2c60b860571d9e6e4f0157d07c52458d0d1c5e.tar.xz
layers:Avoid copy of cmd buffer set
No need to copy the entire unordered_set<GLOBAL_CB_NODE *> in invalidateCommandBuffers(). Change it to take a "const &" instead.
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 f57a403c..9cb9fad3 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -6386,7 +6386,7 @@ VKAPI_ATTR VkResult VKAPI_CALL ResetFences(VkDevice device, uint32_t fenceCount,
}
// For given cb_nodes, invalidate them and track object causing invalidation
-void invalidateCommandBuffers(const layer_data *dev_data, std::unordered_set<GLOBAL_CB_NODE *> cb_nodes, VK_OBJECT obj) {
+void invalidateCommandBuffers(const layer_data *dev_data, std::unordered_set<GLOBAL_CB_NODE *> const &cb_nodes, VK_OBJECT obj) {
for (auto cb_node : cb_nodes) {
if (cb_node->state == CB_RECORDING) {
log_msg(dev_data->report_data, VK_DEBUG_REPORT_WARNING_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,