diff options
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 3f159b29..693b3ae4 100644 --- a/layers/descriptor_sets.cpp +++ b/layers/descriptor_sets.cpp @@ -604,12 +604,13 @@ void cvdescriptorset::DescriptorSet::PerformWriteUpdate(const VkWriteDescriptorS auto descriptors_remaining = update->descriptorCount; auto binding_being_updated = update->dstBinding; auto offset = update->dstArrayElement; + uint32_t update_index = 0; while (descriptors_remaining) { uint32_t update_count = std::min(descriptors_remaining, GetDescriptorCountFromBinding(binding_being_updated)); auto global_idx = p_layout_->GetGlobalStartIndexFromBinding(binding_being_updated) + offset; // Loop over the updates for a single binding at a time - for (uint32_t di = 0; di < update_count; ++di) { - descriptors_[global_idx + di]->WriteUpdate(update, di); + for (uint32_t di = 0; di < update_count; ++di, ++update_index) { + descriptors_[global_idx + di]->WriteUpdate(update, update_index); } // Roll over to next binding in case of consecutive update descriptors_remaining -= update_count; |
