[VMA] Use Host cached and Host coherent for Download operations
All checks were successful
eden-license / license-header (pull_request) Successful in 37s

Increase read speeds by using appropriate usage flags
This commit is contained in:
wildcard 2025-09-13 18:21:32 +02:00 committed by crueter
parent dac2efc4c8
commit 72b3f1f925

View file

@ -49,6 +49,9 @@ namespace Vulkan {
}
[[nodiscard]] VkMemoryPropertyFlags MemoryUsagePreferredVmaFlags(MemoryUsage usage) {
if (usage == MemoryUsage::Download) {
return VK_MEMORY_PROPERTY_HOST_CACHED_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT;
}
return usage != MemoryUsage::DeviceLocal ? VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
: VkMemoryPropertyFlagBits{};
}