aboutsummaryrefslogtreecommitdiff
path: root/layers/descriptor_sets.cpp
diff options
context:
space:
mode:
authorTobin Ehlis <tobine@google.com>2016-06-20 13:07:34 -0600
committerTobin Ehlis <tobine@google.com>2016-06-20 13:34:13 -0600
commitcdd310bb478ad4f7ca70412dbc7a21cd98158fe2 (patch)
treeac2005199b780c14ffdbd8f0bbd691dd9e984463 /layers/descriptor_sets.cpp
parente35e8aab1eaf50bebc56b65e46d1a1f34fd29d83 (diff)
downloadusermoji-cdd310bb478ad4f7ca70412dbc7a21cd98158fe2.tar.xz
layers: Fix dynamic descriptor count
When creating descriptor set layout, we were only incrementing the dynamic descriptor count by 1 regardless of the number of descriptors in a binding. This fix increments the count by the number of descriptors in the binding.
Diffstat (limited to 'layers/descriptor_sets.cpp')
-rw-r--r--layers/descriptor_sets.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp
index a8e88cf8..f8bd9cc8 100644
--- a/layers/descriptor_sets.cpp
+++ b/layers/descriptor_sets.cpp
@@ -50,7 +50,7 @@ cvdescriptorset::DescriptorSetLayout::DescriptorSetLayout(debug_report_data *rep
}
if (p_create_info->pBindings[i].descriptorType == VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC ||
p_create_info->pBindings[i].descriptorType == VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC) {
- dynamic_descriptor_count_++;
+ dynamic_descriptor_count_ += p_create_info->pBindings[i].descriptorCount;
}
}
}