Size of binding area of a resource

Helo, for a given resource (VkBuffer or VkImage)
VkMemoryRequirements is given

My question is
Is the size a multiple of the alignment in this struct ?

typedef struct VkMemoryRequirements {
VkDeviceSize size;
VkDeviceSize alignment;
uint32_t memoryTypeBits;
} VkMemoryRequirements;

I guess it is yes
but I cannot find a reference saying that the size should be a multiple of alignment

Thank you

You should not assume that the size is aligned to the alignment.

1 Like

Oh, thank you
but I guess the size should be aligned to that alignment, according to my experience in Vulkan
however, there may be cases which aren’t, as you mention

Have a nice day and see you, Alfonse