https://www.khronos.org/registry/vulkan/specs/1.0/man/html/VkVertexInputBindingDescription.html
- binding is the binding number that this struct
I think I have figured out what the purpose of binding is
No, you haven't, but you are close to it.
The buffer binding has the same meaning as it does when using separate attribute formats in OpenGL. There are attribute locations and there are buffer binding indices. Each attribute location has a format and offset that defines how to interpret its data. But it also has to have a way to say which buffer it uses.
In Vulkan, attributes and their formats are immutable for a particular pipeline. Attribute formats for a pipeline are established at creation time and cannot be changed. However, the buffers those attributes pull from are mutable state. They are not fixed at pipeline creation time.
binding is an index into the pBuffers array bound by vkCmdBindVertexBuffers. Each vertex attribute has a binding that says which buffer binding index the attribute gets its data from. But the buffer itself is not specified at creation time. You set it dynamically with vkCmdBindVertexBuffers.
So the binding value for an attribute is equivalent to the binding value you provide to glVertexAttribBinding.