VMA memory type selection: controlling allocation strategy across discrete and integrated GPUs
0 reputation · 06 May 2026, 02:29 UTC
I am using the Vulkan Memory Allocator (VMA) to manage VkDeviceMemory for buffers and images, and I need predictable memory type selection across both discrete and integrated GPUs. VMA automates the choice of memory type from vkGetPhysicalDeviceMemoryProperties based on usage flags, but the 'optimal' type differs by hardware architecture — for example, HOST_VISIBLE memory that is also DEVICE_LOCAL (resizable BAR / unified memory) behaves very differently from a discrete card's separate host-visible pool.
My constraint is that I want staging buffers to prefer host-visible memory while device-only resources stay DEVICE_LOCAL, without hardcoding memory type indices, since those indices vary per device. I also need to respect the per-resource VkMemoryRequirements alignment, and I am unsure how VMA's pool and budget settings interact with driver limits on the number of live allocations.
Assume Vulkan 1.2+ and a recent VMA release; I plan to verify behavior with the validation layers.
Specifically:
- Which VMA allocation-create flags or usage enums are the intended way to express 'prefer host-visible but allow fallback' rather than a fixed memory type?
- How should a custom
VmaPoolbe configured so one resource category cannot exhaust the allocation budget of another? - Is there a documented way to query which memory type VMA actually selected, for logging and validation purposes?