From 03918739683bd7c81c2572da6036fcae75d1387c Mon Sep 17 00:00:00 2001 From: iostrows Date: Thu, 2 Jun 2016 15:56:26 +0200 Subject: layers: GH611 Fix dynamic offset indexing --- layers/descriptor_sets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'layers/descriptor_sets.cpp') diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp index e1602251..0530f40c 100644 --- a/layers/descriptor_sets.cpp +++ b/layers/descriptor_sets.cpp @@ -341,13 +341,13 @@ bool cvdescriptorset::DescriptorSet::IsCompatible(const DescriptorSetLayout *lay // Return true if state is acceptable, or false and write an error message into error string bool cvdescriptorset::DescriptorSet::ValidateDrawState(const std::unordered_set &bindings, const std::vector &dynamic_offsets, std::string *error) const { + auto dyn_offset_index = 0; for (auto binding : bindings) { auto start_idx = p_layout_->GetGlobalStartIndexFromBinding(binding); if (descriptors_[start_idx]->IsImmutableSampler()) { // Nothing to do for strictly immutable sampler } else { auto end_idx = p_layout_->GetGlobalEndIndexFromBinding(binding); - auto dyn_offset_index = 0; for (uint32_t i = start_idx; i <= end_idx; ++i) { if (!descriptors_[i]->updated) { std::stringstream error_str; -- cgit v1.2.3