diff options
| author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-06-17 08:48:41 +0200 |
|---|---|---|
| committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-06-17 08:48:41 +0200 |
| commit | b0d14ec124ac0b820a546153a17e5c83128f0f9f (patch) | |
| tree | 54d52697758796dd8eed9bf3db2d02a0625c6e73 /src/video_core/vulkan_common/vulkan_device.cpp | |
| parent | aa941d40cdddb79db0b31f74c5c2fc3b8e81635f (diff) | |
Reaper: Correct size calculation on Vulkan.
Diffstat (limited to 'src/video_core/vulkan_common/vulkan_device.cpp')
| -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 724a0141c8..707a8b8fb1 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() { void Device::CollectPhysicalMemoryInfo() { const auto mem_properties = physical.GetMemoryProperties(); - const std::size_t num_properties = mem_properties.memoryTypeCount; + const std::size_t num_properties = mem_properties.memoryHeapCount; device_access_memory = 0; for (std::size_t element = 0; element < num_properties; element++) { - if ((mem_properties.memoryTypes[element].propertyFlags & - VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) != 0) { - const std::size_t heap_index = mem_properties.memoryTypes[element].heapIndex; - device_access_memory += mem_properties.memoryHeaps[heap_index].size; + if ((mem_properties.memoryHeaps[element].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT) != 0) { + device_access_memory += mem_properties.memoryHeaps[element].size; } } } |
