mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2025-04-28 13:27:58 +03:00
Fix profiler crashing in the installer. (#1507)
Some checks failed
validate-internal / build (push) Failing after 17s
Some checks failed
validate-internal / build (push) Failing after 17s
This commit is contained in:
parent
1555b97b8a
commit
325e4d34a0
1 changed files with 14 additions and 10 deletions
|
@ -2437,18 +2437,22 @@ static void DrawProfiler()
|
||||||
|
|
||||||
ImGui::NewLine();
|
ImGui::NewLine();
|
||||||
|
|
||||||
O1HeapDiagnostics diagnostics, physicalDiagnostics;
|
if (g_userHeap.heap != nullptr && g_userHeap.physicalHeap != nullptr)
|
||||||
{
|
{
|
||||||
std::lock_guard lock(g_userHeap.mutex);
|
O1HeapDiagnostics diagnostics, physicalDiagnostics;
|
||||||
diagnostics = o1heapGetDiagnostics(g_userHeap.heap);
|
{
|
||||||
|
std::lock_guard lock(g_userHeap.mutex);
|
||||||
|
diagnostics = o1heapGetDiagnostics(g_userHeap.heap);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
std::lock_guard lock(g_userHeap.physicalMutex);
|
||||||
|
physicalDiagnostics = o1heapGetDiagnostics(g_userHeap.physicalHeap);
|
||||||
|
}
|
||||||
|
|
||||||
|
ImGui::Text("Heap Allocated: %d MB", int32_t(diagnostics.allocated / (1024 * 1024)));
|
||||||
|
ImGui::Text("Physical Heap Allocated: %d MB", int32_t(physicalDiagnostics.allocated / (1024 * 1024)));
|
||||||
}
|
}
|
||||||
{
|
|
||||||
std::lock_guard lock(g_userHeap.physicalMutex);
|
|
||||||
physicalDiagnostics = o1heapGetDiagnostics(g_userHeap.physicalHeap);
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::Text("Heap Allocated: %d MB", int32_t(diagnostics.allocated / (1024 * 1024)));
|
|
||||||
ImGui::Text("Physical Heap Allocated: %d MB", int32_t(physicalDiagnostics.allocated / (1024 * 1024)));
|
|
||||||
ImGui::Text("GPU Waits: %d", int32_t(g_waitForGPUCount));
|
ImGui::Text("GPU Waits: %d", int32_t(g_waitForGPUCount));
|
||||||
ImGui::Text("Buffer Uploads: %d", int32_t(g_bufferUploadCount));
|
ImGui::Text("Buffer Uploads: %d", int32_t(g_bufferUploadCount));
|
||||||
ImGui::NewLine();
|
ImGui::NewLine();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue