1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-19 05:52:11 +01:00

[dxvk] Log memory utilization per heap on memory allocation failures

This commit is contained in:
Philip Rebohle 2019-06-19 14:47:09 +02:00
parent 684355dfca
commit 0a35ae6fca
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -201,6 +201,14 @@ namespace dxvk {
"\n Alignment: ", req->alignment,
"\n Mem flags: ", "0x", std::hex, flags,
"\n Mem types: ", "0x", std::hex, req->memoryTypeBits));
for (uint32_t i = 0; i < m_memProps.memoryHeapCount; i++) {
Logger::err(str::format("Heap ", i, ": ",
(m_memHeaps[i].stats.memoryAllocated >> 20), " MB allocated, ",
(m_memHeaps[i].stats.memoryUsed >> 20), " MB used, ",
(m_memHeaps[i].properties.size >> 20), " MB available"));
}
throw DxvkError("DxvkMemoryAllocator: Memory allocation failed");
}