mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-22 19:00:14 -05:00
Reaper: Correct size calculation on Vulkan.
This commit is contained in:
parent
ca6f47c686
commit
719a6dd5a1
1 changed files with 3 additions and 5 deletions
|
@ -821,13 +821,11 @@ void Device::CollectTelemetryParameters() {
|
||||||
|
|
||||||
void Device::CollectPhysicalMemoryInfo() {
|
void Device::CollectPhysicalMemoryInfo() {
|
||||||
const auto mem_properties = physical.GetMemoryProperties();
|
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;
|
device_access_memory = 0;
|
||||||
for (std::size_t element = 0; element < num_properties; element++) {
|
for (std::size_t element = 0; element < num_properties; element++) {
|
||||||
if ((mem_properties.memoryTypes[element].propertyFlags &
|
if ((mem_properties.memoryHeaps[element].flags & VK_MEMORY_HEAP_DEVICE_LOCAL_BIT) != 0) {
|
||||||
VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT) != 0) {
|
device_access_memory += mem_properties.memoryHeaps[element].size;
|
||||||
const std::size_t heap_index = mem_properties.memoryTypes[element].heapIndex;
|
|
||||||
device_access_memory += mem_properties.memoryHeaps[heap_index].size;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue