For some reason ds_layouts_vk in Anvil::PipelineLayout::bake is initialized with the number of descriptor sets that were given as input +1:
bool Anvil::PipelineLayout::bake(const std::vector<DescriptorSetCreateInfoUniquePtr>* in_ds_create_info_items_ptr)
{
[...]
ds_layouts_vk.resize(in_ds_create_info_items_ptr->size() + 1,
dummy_ds_layout);
[...]
}
I'm assuming this is a bug. This can be a problem with some Nvidia GPUs where only up to 8 descriptor sets are allowed.