LWJGL/lwjgl3

Why are all the members of the VkMemoryRequirements class in the Vulkan bindings read-only?

HamiltonHuaji opened this issue · 1 comments

Question

The size member of the VkMemoryRequirements object obtained through vkGetBufferMemoryRequirements is always the size of the entire buffer. At the same time, there is no way to construct a VkMemoryRequirements object with arbitrary contents.
So when allocating device memory pages for sparse residency buffers, it is necessary to modify the size member of this class to the size of the memory page being requested before passing it to functions like vmaAllocateMemoryPages.

@HamiltonHuaji VkMemoryRequirements will be mutable in the first 3.3.4 snapshot, thanks!