From cdd310bb478ad4f7ca70412dbc7a21cd98158fe2 Mon Sep 17 00:00:00 2001 From: Tobin Ehlis Date: Mon, 20 Jun 2016 13:07:34 -0600 Subject: [PATCH] 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. --- layers/descriptor_sets.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layers/descriptor_sets.cpp b/layers/descriptor_sets.cpp index a8e88cf..f8bd9cc 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; } } } -- 2.7.4