Why are all the members of the VkMemoryRequirements class in the Vulkan bindings read-only?
HamiltonHuaji opened this issue · 1 comments
HamiltonHuaji commented
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
.
Spasi commented
@HamiltonHuaji VkMemoryRequirements
will be mutable in the first 3.3.4 snapshot, thanks!