layers: Fix dynamic descriptor count
authorTobin Ehlis <tobine@google.com>
Mon, 20 Jun 2016 19:07:34 +0000 (13:07 -0600)
committerTobin Ehlis <tobine@google.com>
Mon, 20 Jun 2016 19:34:13 +0000 (13:34 -0600)
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

index a8e88cf..f8bd9cc 100644 (file)
@@ -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;
         }
     }
 }