diff options
| author | 2021-06-17 08:48:41 +0200 | |
|---|---|---|
| committer | 2021-06-17 08:48:41 +0200 | |
| commit | 719a6dd5a16ed08df392af695dfc08b0f5e1f00f (patch) | |
| tree | 54d52697758796dd8eed9bf3db2d02a0625c6e73 /src | |
| parent | Reaper: Change memory restrictions on TC depending on host memory on VK. (diff) | |
| download | yuzu-719a6dd5a16ed08df392af695dfc08b0f5e1f00f.tar.gz yuzu-719a6dd5a16ed08df392af695dfc08b0f5e1f00f.tar.xz yuzu-719a6dd5a16ed08df392af695dfc08b0f5e1f00f.zip | |
Reaper: Correct size calculation on Vulkan.
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/vulkan_common/vulkan_device.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/video_core/vulkan_common/vulkan_device.cpp b/src/video_core/vulkan_common/vulkan_device.cpp index 724a0141c..707a8b8fb 100644 --- a/src/video_core/vulkan_common/vulkan_device.cpp +++ b/src/video_core/vulkan_common/vulkan_device.cpp | |||
| @@ -821,13 +821,11 @@ void Device::CollectTelemetryParameters() { | |||
| 821 | 821 | ||
| 822 | void Device::CollectPhysicalMemoryInfo() { | 822 | void Device::CollectPhysicalMemoryInfo() { |
| 823 | const auto mem_properties = physical.GetMemoryProperties(); | 823 | const auto mem_properties = physical.GetMemoryProperties(); |
| 824 | const std::size_t num_properties = mem_properties.memoryTypeCount; | 824 | const std::size_t num_properties = mem_properties.memoryHeapCount; |
| 825 | device_access_memory = 0; | 825 | device_access_memory = 0; |
| 826 | for (std::size_t element = 0; element < num_properties; element++) { | 826 | for (std::size_t element = 0; element < num_properties; element++) { |
| 827 | if ((mem_properties.memoryTypes[element].propertyFlags & | 827 | if ((mem_properties.memoryHeaps[element].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT) != 0) { |
| 828 | VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) != 0) { | 828 | device_access_memory += mem_properties.memoryHeaps[element].size; |
| 829 | const std::size_t heap_index = mem_properties.memoryTypes[element].heapIndex; | ||
| 830 | device_access_memory += mem_properties.memoryHeaps[heap_index].size; | ||
| 831 | } | 829 | } |
| 832 | } | 830 | } |
| 833 | } | 831 | } |