diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2023-10-11 15:24:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-11 15:24:28 +0200 |
commit | 84b0e29b5649304855f819f3155658d26e260562 (patch) | |
tree | aed859402da4cf3068b922982856a97aaa6f8ad0 | |
parent | Merge pull request #11735 from Kelebek1/clear_command_buffer_post_dsp (diff) | |
parent | Not not allocate DeviceLocal buffers as mapped (diff) | |
download | yuzu-84b0e29b5649304855f819f3155658d26e260562.tar yuzu-84b0e29b5649304855f819f3155658d26e260562.tar.gz yuzu-84b0e29b5649304855f819f3155658d26e260562.tar.bz2 yuzu-84b0e29b5649304855f819f3155658d26e260562.tar.lz yuzu-84b0e29b5649304855f819f3155658d26e260562.tar.xz yuzu-84b0e29b5649304855f819f3155658d26e260562.tar.zst yuzu-84b0e29b5649304855f819f3155658d26e260562.zip |
-rw-r--r-- | src/video_core/vulkan_common/vulkan_memory_allocator.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp index 82767fdf0..8dd1667f3 100644 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp @@ -66,9 +66,10 @@ struct Range { switch (usage) { case MemoryUsage::Upload: case MemoryUsage::Stream: - return VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT; + return VMA_ALLOCATION_CREATE_MAPPED_BIT | + VMA_ALLOCATION_CREATE_HOST_ACCESS_SEQUENTIAL_WRITE_BIT; case MemoryUsage::Download: - return VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT; + return VMA_ALLOCATION_CREATE_MAPPED_BIT | VMA_ALLOCATION_CREATE_HOST_ACCESS_RANDOM_BIT; case MemoryUsage::DeviceLocal: return {}; } @@ -252,8 +253,7 @@ vk::Image MemoryAllocator::CreateImage(const VkImageCreateInfo& ci) const { vk::Buffer MemoryAllocator::CreateBuffer(const VkBufferCreateInfo& ci, MemoryUsage usage) const { const VmaAllocationCreateInfo alloc_ci = { - .flags = VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT | VMA_ALLOCATION_CREATE_MAPPED_BIT | - MemoryUsageVmaFlags(usage), + .flags = VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT | MemoryUsageVmaFlags(usage), .usage = MemoryUsageVma(usage), .requiredFlags = 0, .preferredFlags = MemoryUsagePreferedVmaFlags(usage), |