aboutsummaryrefslogtreecommitdiff
path: root/layers/descriptor_sets.cpp
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2016-11-21 08:31:01 -0700
committerTobin Ehlis <tobine@google.com>2016-11-21 08:59:44 -0700
commit92d20e9c602e6cbb968989d82e8bc677daa1d61c (patch)
tree6ed2006445b55f23234c17385b166a8b50a1dc9d /layers/descriptor_sets.cpp
parent0c64542997555318f2b54a8661e6ce566e1cf56d (diff)
downloadusermoji-92d20e9c602e6cbb968989d82e8bc677daa1d61c.tar.xz
layers:Warn on cmd buffer invalidate
From Mikko Strandborg When a resource gets deleted, any command buffer that references it gets invalidated, and an error gets thrown whenever that command buffer is submitted. However, for a developer, it's quite hard to deduce what exactly caused that to happen. This patch emits a warning whenever a command buffer that's in CB_RECORDING state (meaning that it has had its vkBeginCommandBuffer called but not End). This way the developer can set a breakpoint on that to see exactly what causes the buffer to be invalidated. Destroying a resource that's being used in an open command buffer is almost certainly a bug, but there might still be cases where it might be valid behavior (for example, when the application decides to abort an operation), therefore it's not an error but a warning instead.
Diffstat (limited to 'layers/descriptor_sets.cpp')
-rw-r--r--layers/descriptor_sets.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp
index f2326dcb..2a6b73e1 100644
--- a/layers/descriptor_sets.cpp
+++ b/layers/descriptor_sets.cpp
@@ -541,7 +541,7 @@ uint32_t cvdescriptorset::DescriptorSet::GetStorageUpdates(const std::map<uint32
}
// Set is being deleted or updates so invalidate all bound cmd buffers
void cvdescriptorset::DescriptorSet::InvalidateBoundCmdBuffers() {
- core_validation::invalidateCommandBuffers(cb_bindings,
+ core_validation::invalidateCommandBuffers(device_data_, cb_bindings,
{reinterpret_cast<uint64_t &>(set_), VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT});
}
// Perform write update in given update struct