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:
parent
684355dfca
commit
0a35ae6fca
@ -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");
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user