diff options
author | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2023-10-10 13:49:07 +0200 |
---|---|---|
committer | Kelebek1 <eeeedddccc@hotmail.co.uk> | 2023-10-10 13:49:07 +0200 |
commit | ed58445111d46a30f6f38b82baaa1bc8a7259d4a (patch) | |
tree | 754f6b5879055e2c321bf87a4ba8f5cccf80a5d3 /src | |
parent | Merge pull request #11716 from Squall-Leonhart/Z327444 (diff) | |
download | yuzu-ed58445111d46a30f6f38b82baaa1bc8a7259d4a.tar yuzu-ed58445111d46a30f6f38b82baaa1bc8a7259d4a.tar.gz yuzu-ed58445111d46a30f6f38b82baaa1bc8a7259d4a.tar.bz2 yuzu-ed58445111d46a30f6f38b82baaa1bc8a7259d4a.tar.lz yuzu-ed58445111d46a30f6f38b82baaa1bc8a7259d4a.tar.xz yuzu-ed58445111d46a30f6f38b82baaa1bc8a7259d4a.tar.zst yuzu-ed58445111d46a30f6f38b82baaa1bc8a7259d4a.zip |
Diffstat (limited to 'src')
-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), |