Overv / VulkanTutorial

Tutorial for the Vulkan graphics and compute API
https://vulkan-tutorial.com
Creative Commons Attribution Share Alike 4.0 International
3.15k stars 516 forks source link

Fix description of vkAllocateDescriptorSets error #213

Closed maltekliemann closed 3 years ago

maltekliemann commented 3 years ago

The way that vkAllocateDescriptorSets handles errors from inadequate pools was changed in VK_KHR_maintenance1, which was promoted to core in Vulkan 1.1:

If a call to vkAllocateDescriptorSets would cause the total number of descriptor sets allocated from the pool to exceed the value of VkDescriptorPoolCreateInfo::maxSets used to create pAllocateInfo->descriptorPool, then the allocation may fail due to lack of space in the descriptor pool. Similarly, the allocation may fail due to lack of space if the call to vkAllocateDescriptorSets would cause the number of any given descriptor type to exceed the sum of all the descriptorCount members of each element of VkDescriptorPoolCreateInfo::pPoolSizes with a member equal to that type.

This means that in Vulkan >=1.1, there is no validation layer message anymore (unless you're using Best Practices Validation). Some more info: KhronosGroup/Vulkan-ValidationLayers#2041.

Overv commented 3 years ago

Nice!