title: What is the purpose of the maximum number of sets in a Vulkan descriptor set pool?
body: <p>In the <code>VkDescriptorPoolCreateInfo</code> structure we specify the <code>maxSets</code> field that configures the maximum number of descriptors sets that <strong>can</strong> be allocated from a given pool.  But what exactly is this maximum setting doing under the hood (if anything)?</p>
  <p>For example, we could create a simple application with a pool containing (say) three combined image samplers and three uniform buffers, with the intention of creating three descriptor sets (sampler and UBO) for a triple-buffered strategy.</p>
  <p>But the application <em>could</em> theoretically allocate anywhere between zero and six sets from this pool depending on the layout of the allocated descriptor sets and what we configure <code>maxSets</code> to be.  i.e. the pool does not know what layouts will be requested, only the available number of each resource type.</p>
  <p>So is <code>maxSets</code> a <em>hint</em> to the hardware?  Or is there some other reason?  I have looked through the documentation but cannot find anything other than this line in the spec:</p>
  <blockquote>
  <p>maxSets is the maximum number of descriptor sets that <strong>can</strong> be allocated from the pool.</p>
  </blockquote>
  <p>Or is it used by Vulkan to double-check that the application does not allocate more sets than the configured pool size?  To continue the example we could configure <code>maxSets</code> to four (valid if not logical) but if we try to allocate a fourth descriptor set from the pool the allocation will fail anyway because the pool is exhausted, so why configure a property that is the responsibility of the application?</p>