diff options
| author | Tobin Ehlis <tobine@google.com> | 2016-12-29 12:22:32 -0700 |
|---|---|---|
| committer | Tobin Ehlis <tobine@google.com> | 2016-12-29 13:59:12 -0700 |
| commit | b53a71ca9a2710957212bb61907de78f6d30a993 (patch) | |
| tree | 784c185bbd2e0533a718b06d383e2b74b126a416 /layers/descriptor_sets.cpp | |
| parent | 215b9e971be0ff877d2c89207c343ceacf592f61 (diff) | |
| download | usermoji-b53a71ca9a2710957212bb61907de78f6d30a993.tar.xz | |
layers:Don't pass active binding set around
The active bindings set was being passed around but the data is only
used in a couple places and an alternate form of it is available in the
binding->requirement map. Also, the binding set was wrong in that it
stored bindings for all bound sets at draw time, but was being used to
check bindings for individual sets.
Diffstat (limited to 'layers/descriptor_sets.cpp')
| -rw-r--r-- | layers/descriptor_sets.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp index 2e319585..ccfad829 100644 --- a/layers/descriptor_sets.cpp +++ b/layers/descriptor_sets.cpp @@ -700,7 +700,7 @@ void cvdescriptorset::DescriptorSet::PerformCopyUpdate(const VkCopyDescriptorSet // Prereq: This should be called for a set that has been confirmed to be active for the given cb_node, meaning it's going // to be used in a draw by the given cb_node void cvdescriptorset::DescriptorSet::BindCommandBuffer(GLOBAL_CB_NODE *cb_node, - const std::unordered_set<uint32_t> *active_bindings) { + const std::map<uint32_t, descriptor_req> &binding_req_map) { // bind cb to this descriptor set cb_bindings.insert(cb_node); // Add bindings for descriptor set, the set's pool, and individual objects in the set @@ -710,7 +710,8 @@ void cvdescriptorset::DescriptorSet::BindCommandBuffer(GLOBAL_CB_NODE *cb_node, {reinterpret_cast<uint64_t &>(pool_state_->pool), VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_POOL_EXT}); // For the active slots, use set# to look up descriptorSet from boundDescriptorSets, and bind all of that descriptor set's // resources - for (auto binding : *active_bindings) { + for (auto binding_req_pair : binding_req_map) { + auto binding = binding_req_pair.first; auto start_idx = p_layout_->GetGlobalStartIndexFromBinding(binding); auto end_idx = p_layout_->GetGlobalEndIndexFromBinding(binding); for (uint32_t i = start_idx; i <= end_idx; ++i) { |
