Reputation: 345
How do you grow a VkBuffer
's size, as in the VkBufferCreateInfo.size
?
Should I destroy the buffer and make a new one or can I just bind more memory by calling vkBindBufferMemory
?
Upvotes: 1
Views: 652
Reputation: 48196
Once a buffer is created the size is fixed for the lifetime of the vkBuffer. Once memory has been bound to a buffer that binding is set for the remaining lifetime of the vkBuffer. Even if you free the backing vkMemory, the buffer becomes unusable.
So yes you have to create a new vkBuffer to change either of these properties.
Upvotes: 5