Question about vkUpdateDescriptorSets

The spec isn’t clear about how vkUpdateDescriptorSets actually works. Is there a big difference between calling the function once with multiple VkWriteDescriptorSets or calling it multiple times, each with one VkWriteDescriptorSet?

Ideally, you’d call it once with multiple VkWriteDescriptorSets, but it would be really convenient for me to call the function multiple times.


It’s not clear what you find unclear.

In terms of functionality, none. However, the function permits you to apply multiple WriteDescriptorSet objects at once. When an API allows you to perform multiple repeated operations in a single call, it’s a good guess that there may be a performance reason for that.

Much like you can call std::vector::insert with a single object. But the function allows you to provide a range of more than one. Why? Because if you’re genuinely inserting multiple objects, the latter will probably be faster than doing it one-by-one.

What makes you think you can’t do that?

Equally importantly, what’s stopping you from simply storing all of those VkWriteDescriptorSet objects, then calling vkUpdateDescriptorSets just once with all of them?