Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
HamiltonHuaji opened this issue Oct 31, 2023 · 1 comment

Comments

@HamiltonHuaji
Copy link

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
Copy link
Member

Spasi commented Nov 8, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants