VK_ERROR_OUT_OF_DEVICE_MEMORY during memory heap allocation
23K reputation · 23 Feb 2021, 21:30 UTC
An application utilizing the Vulkan API manages memory by requesting specific heap types based on the VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT flag. While the allocation logic functions correctly on high-capacity development hardware, it fails on production devices with smaller VRAM footprints or different memory architectures.
The current implementation relies on querying vkGetPhysicalDeviceMemoryProperties, but the strategy for handling cases where the requested memory exceeds the available physical device heap remains undefined. There is uncertainty regarding whether to implement a fallback to system-visible memory or to dynamically scale asset quality based on the reported heap size.
- How should the application prioritize memory type selection when the primary device-local heap is exhausted?
- What is the recommended approach for mapping memory types across disparate GPU vendors to ensure portability?