I would like to combine my several buffers into a single device memory.
-
If their alignment requirements are different, how should I treat when allocating and mapping memory. Should I calculate allocation size depending on these alignments and also when mapping them should I use their VkBufferCreateInfo’s size or VkMemoryRequirements’s size and alignment for offsets.
-
I’ve realized that when buffer usage changes, the alignment changes also (like VERTEX_BIT and UNIFORM_BIT). I created 52 byte buffer and when usage was VERTEX_BIT , alignment was 16 byte which is understandable but when usage was UNIFORM_BIT, alignment was 64 byte. How it is possible, how it works? I couldn’t see the differences by using Nsight graphics because it doesn’t show the way how api uses these buffers.
Thanks…