From 46e0952e97bae2cfdecaeed88f7768d028718918 Mon Sep 17 00:00:00 2001 From: Jordan Woyak Date: Wed, 5 Mar 2025 03:26:34 -0600 Subject: PerformanceTracker: Use SPSCQueue and atomic to eliminate need for a mutex. Clean up some math. --- Source/Core/VideoCommon/PerformanceMetrics.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'Source/Core/VideoCommon/PerformanceMetrics.cpp') diff --git a/Source/Core/VideoCommon/PerformanceMetrics.cpp b/Source/Core/VideoCommon/PerformanceMetrics.cpp index 773dc44383..2a4928cd7e 100644 --- a/Source/Core/VideoCommon/PerformanceMetrics.cpp +++ b/Source/Core/VideoCommon/PerformanceMetrics.cpp @@ -48,6 +48,7 @@ void PerformanceMetrics::CountPerformanceMarker(Core::System& system, s64 cycles { std::unique_lock lock(m_time_lock); m_speed_counter.Count(); + m_speed_counter.UpdateStats(); m_real_times[m_time_index] = Clock::now() - m_time_sleeping; m_cpu_times[m_time_index] = system.GetCoreTiming().GetCPUTimePoint(cyclesLate); @@ -84,6 +85,9 @@ double PerformanceMetrics::GetLastSpeedDenominator() const void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale) { + m_vps_counter.UpdateStats(); + m_fps_counter.UpdateStats(); + const int movable_flag = Config::Get(Config::GFX_MOVABLE_PERFORMANCE_METRICS) ? ImGuiWindowFlags_None : ImGuiWindowFlags_NoMove; -- cgit v1.2.3