[VMA] Use Host cached and Host coherent for Download operations
All checks were successful
eden-license / license-header (pull_request) Successful in 44s
All checks were successful
eden-license / license-header (pull_request) Successful in 44s
Increase read speeds by using appropriate usage flags
This commit is contained in:
parent
8ac495acee
commit
0b3c687415
1 changed files with 3 additions and 0 deletions
|
@ -49,6 +49,9 @@ namespace Vulkan {
|
||||||
}
|
}
|
||||||
|
|
||||||
[[nodiscard]] VkMemoryPropertyFlags MemoryUsagePreferredVmaFlags(MemoryUsage usage) {
|
[[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
|
return usage != MemoryUsage::DeviceLocal ? VK_MEMORY_PROPERTY_HOST_COHERENT_BIT
|
||||||
: VkMemoryPropertyFlagBits{};
|
: VkMemoryPropertyFlagBits{};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue