diff options
| author | Tobin Ehlis <tobine@google.com> | 2016-07-21 14:40:22 -0600 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-08-23 18:39:23 -0600 |
| commit | c5bc8e1a5a98212f80673b95b1389c4a95442a17 (patch) | |
| tree | f0f1485bc61d96a799950b41f5dff64ef432c28d /layers/descriptor_sets.cpp | |
| parent | e8456790d6395c4447758bee29c94111977397d9 (diff) | |
| download | usermoji-c5bc8e1a5a98212f80673b95b1389c4a95442a17.tar.xz | |
layers: Add descriptor sets to CB_INVALID tracking
This is start of a series intended to enable CB_INVALID tracking for
descriptor sets. Much of the tracking is already in place in the
special-purpose uniqueBoundSets data struct, so I'll be migrating
the tracking from that struct to the more general-purpose
object_bindings set.
Diffstat (limited to 'layers/descriptor_sets.cpp')
| -rw-r--r-- | layers/descriptor_sets.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp index 1d568f4d..d9eb2777 100644 --- a/layers/descriptor_sets.cpp +++ b/layers/descriptor_sets.cpp @@ -320,12 +320,6 @@ cvdescriptorset::DescriptorSet::DescriptorSet(const VkDescriptorSet set, const D cvdescriptorset::DescriptorSet::~DescriptorSet() { InvalidateBoundCmdBuffers(); - // Remove link to any 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); - } - } } @@ -630,6 +624,16 @@ void cvdescriptorset::DescriptorSet::PerformCopyUpdate(const VkCopyDescriptorSet InvalidateBoundCmdBuffers(); } +void cvdescriptorset::DescriptorSet::BindCommandBuffer(GLOBAL_CB_NODE *cb_node) { + // bind cb to this descriptor set + cb_bindings.insert(cb_node); + // Add bindings for descriptor set and individual objects in the set + cb_node->object_bindings.insert({reinterpret_cast<uint64_t &>(set_), VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT}); + // TODO : Can bind individual objects from within each descriptor : buffers/images and their views, samplers & memory + // The trick is we should only bind the objects actually "in use" by the cmd buffer, meaning that we need to + // check active descriptor slots based on last bound state for this CB +} + cvdescriptorset::SamplerDescriptor::SamplerDescriptor() : sampler_(VK_NULL_HANDLE), immutable_(false) { updated = false; descriptor_class = PlainSampler; |
