aboutsummaryrefslogtreecommitdiff
path: root/layers/descriptor_sets.cpp
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2016-06-24 17:22:16 -0600
committerTobin Ehlis <tobine@google.com>2016-06-28 07:40:04 -0600
commit232cba4976761d364d2081e123749dbaf7e213ad (patch)
treefa940bf0dacc764cf9ea3578ba8ad3b85f216f79 /layers/descriptor_sets.cpp
parent72a4047d2dbbcfef42251914e1b534d306365ebd (diff)
downloadusermoji-232cba4976761d364d2081e123749dbaf7e213ad.tar.xz
layers: Unify invalid command buffer handling
Created a single vector to track any cmd buffer dependencies that are destroyed and thereby cause the cmd buffer to become invalid. Currently just tracking the previous object types of descriptor sets and framebuffers, but will update the tracking to include all cmd buffer dependencies in future commits.
Diffstat (limited to 'layers/descriptor_sets.cpp')
-rw-r--r--layers/descriptor_sets.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp
index 1f72d447..3767f78d 100644
--- a/layers/descriptor_sets.cpp
+++ b/layers/descriptor_sets.cpp
@@ -321,7 +321,7 @@ cvdescriptorset::DescriptorSet::DescriptorSet(const VkDescriptorSet set, const D
cvdescriptorset::DescriptorSet::~DescriptorSet() {
InvalidateBoundCmdBuffers();
// Remove link to any cmd buffers
- for (auto cb : bound_cmd_buffers_) {
+ for (auto cb : cb_bindings) {
for (uint32_t i=0; i<VK_PIPELINE_BIND_POINT_RANGE_SIZE; ++i) {
cb->lastBound[i].uniqueBoundSets.erase(this);
}
@@ -460,9 +460,8 @@ uint32_t cvdescriptorset::DescriptorSet::GetStorageUpdates(const std::unordered_
}
// Set is being deleted or updates so invalidate all bound cmd buffers
void cvdescriptorset::DescriptorSet::InvalidateBoundCmdBuffers() {
- for (auto cb_node : bound_cmd_buffers_) {
- cb_node->state = CB_INVALID;
- }
+ core_validation::invalidateCommandBuffers(cb_bindings,
+ {reinterpret_cast<uint64_t &>(set_), VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT});
}
// Perform write update in given update struct
void cvdescriptorset::DescriptorSet::PerformWriteUpdate(const VkWriteDescriptorSet *update) {