diff options
author | GPUCode <geoster3d@gmail.com> | 2023-06-22 19:03:12 +0200 |
---|---|---|
committer | GPUCode <geoster3d@gmail.com> | 2023-06-22 19:03:12 +0200 |
commit | 75fb29e08e3891ecfc5d96d54603cda806ebd426 (patch) | |
tree | 4a1d8f5e596e11f27154f4bce2767dc46ffa8510 | |
parent | renderer_vulkan: Add missing initializers (diff) | |
download | yuzu-75fb29e08e3891ecfc5d96d54603cda806ebd426.tar yuzu-75fb29e08e3891ecfc5d96d54603cda806ebd426.tar.gz yuzu-75fb29e08e3891ecfc5d96d54603cda806ebd426.tar.bz2 yuzu-75fb29e08e3891ecfc5d96d54603cda806ebd426.tar.lz yuzu-75fb29e08e3891ecfc5d96d54603cda806ebd426.tar.xz yuzu-75fb29e08e3891ecfc5d96d54603cda806ebd426.tar.zst yuzu-75fb29e08e3891ecfc5d96d54603cda806ebd426.zip |
-rw-r--r-- | src/video_core/vulkan_common/vulkan_memory_allocator.cpp | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp index 20d36680c..70db41343 100644 --- a/src/video_core/vulkan_common/vulkan_memory_allocator.cpp +++ b/src/video_core/vulkan_common/vulkan_memory_allocator.cpp @@ -59,20 +59,6 @@ struct Range { return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_COHERENT_BIT; } -[[nodiscard]] VkMemoryPropertyFlags MemoryUsageRequiredVmaFlags(MemoryUsage usage) { - switch (usage) { - case MemoryUsage::DeviceLocal: - return VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT; - case MemoryUsage::Upload: - case MemoryUsage::Stream: - return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT; - case MemoryUsage::Download: - return VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT | VK_MEMORY_PROPERTY_HOST_CACHED_BIT; - } - ASSERT_MSG(false, "Invalid memory usage={}", usage); - return {}; -} - [[nodiscard]] VkMemoryPropertyFlags MemoryUsagePreferedVmaFlags(MemoryUsage usage) { return usage != MemoryUsage::DeviceLocal ? VK_MEMORY_PROPERTY_HOST_COHERENT_BIT : VkMemoryPropertyFlagBits{}; @@ -259,7 +245,7 @@ vk::Buffer MemoryAllocator::CreateBuffer(const VkBufferCreateInfo& ci, MemoryUsa .flags = VMA_ALLOCATION_CREATE_WITHIN_BUDGET_BIT | VMA_ALLOCATION_CREATE_MAPPED_BIT | MemoryUsageVmaFlags(usage), .usage = MemoryUsageVma(usage), - .requiredFlags = MemoryUsageRequiredVmaFlags(usage), + .requiredFlags = 0, .preferredFlags = MemoryUsagePreferedVmaFlags(usage), .memoryTypeBits = 0, .pool = VK_NULL_HANDLE, |