File tree Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Expand file tree Collapse file tree 1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -2437,18 +2437,22 @@ static void DrawProfiler()
24372437
24382438 ImGui::NewLine ();
24392439
2440- O1HeapDiagnostics diagnostics, physicalDiagnostics;
2440+ if (g_userHeap. heap != nullptr && g_userHeap. physicalHeap != nullptr )
24412441 {
2442- std::lock_guard lock (g_userHeap.mutex );
2443- diagnostics = o1heapGetDiagnostics (g_userHeap.heap );
2444- }
2445- {
2446- std::lock_guard lock (g_userHeap.physicalMutex );
2447- physicalDiagnostics = o1heapGetDiagnostics (g_userHeap.physicalHeap );
2442+ O1HeapDiagnostics diagnostics, physicalDiagnostics;
2443+ {
2444+ std::lock_guard lock (g_userHeap.mutex );
2445+ diagnostics = o1heapGetDiagnostics (g_userHeap.heap );
2446+ }
2447+ {
2448+ std::lock_guard lock (g_userHeap.physicalMutex );
2449+ physicalDiagnostics = o1heapGetDiagnostics (g_userHeap.physicalHeap );
2450+ }
2451+
2452+ ImGui::Text (" Heap Allocated: %d MB" , int32_t (diagnostics.allocated / (1024 * 1024 )));
2453+ ImGui::Text (" Physical Heap Allocated: %d MB" , int32_t (physicalDiagnostics.allocated / (1024 * 1024 )));
24482454 }
2449-
2450- ImGui::Text (" Heap Allocated: %d MB" , int32_t (diagnostics.allocated / (1024 * 1024 )));
2451- ImGui::Text (" Physical Heap Allocated: %d MB" , int32_t (physicalDiagnostics.allocated / (1024 * 1024 )));
2455+
24522456 ImGui::Text (" GPU Waits: %d" , int32_t (g_waitForGPUCount));
24532457 ImGui::Text (" Buffer Uploads: %d" , int32_t (g_bufferUploadCount));
24542458 ImGui::NewLine ();
You can’t perform that action at this time.
0 commit comments