From ebf114aef5637bf35e1d843126c466fee916db8e Mon Sep 17 00:00:00 2001 From: Sam Belliveau Date: Sun, 29 Jan 2023 13:33:48 -0500 Subject: Tie Speed to CPU Speed and not VPS --- Source/Core/VideoCommon/PerformanceMetrics.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Source/Core/VideoCommon/PerformanceMetrics.cpp') diff --git a/Source/Core/VideoCommon/PerformanceMetrics.cpp b/Source/Core/VideoCommon/PerformanceMetrics.cpp index b343af0f4f..923860cf8d 100644 --- a/Source/Core/VideoCommon/PerformanceMetrics.cpp +++ b/Source/Core/VideoCommon/PerformanceMetrics.cpp @@ -34,7 +34,6 @@ void PerformanceMetrics::CountFrame() void PerformanceMetrics::CountVBlank() { m_vps_counter.Count(); - m_speed_counter.Count(); } void PerformanceMetrics::CountThrottleSleep(DT sleep) @@ -46,6 +45,8 @@ void PerformanceMetrics::CountThrottleSleep(DT sleep) void PerformanceMetrics::CountPerformanceMarker(Core::System& system, s64 cyclesLate) { std::unique_lock lock(m_time_lock); + m_speed_counter.Count(); + m_real_times[m_time_index] = Clock::now() - m_time_sleeping; m_cpu_times[m_time_index] = system.GetCoreTiming().GetCPUTimePoint(cyclesLate); m_time_index += 1; @@ -63,7 +64,7 @@ double PerformanceMetrics::GetVPS() const double PerformanceMetrics::GetSpeed() const { - return m_speed_counter.GetHzAvg() / VideoInterface::GetTargetRefreshRate(); + return m_speed_counter.GetHzAvg() / 100.0; } double PerformanceMetrics::GetMaxSpeed() const @@ -147,8 +148,8 @@ void PerformanceMetrics::DrawImGuiStats(const float backbuffer_scale) const DT frame_time = m_fps_counter.GetDtAvg() + 2 * m_fps_counter.GetDtStd(); const double target_max_time = DT_ms(vblank_time + frame_time).count(); const double a = - std::max(0.0, 1.0 - std::exp(-4.0 * (DT_s(m_vps_counter.GetLastRawDt()) / - DT_s(m_vps_counter.GetSampleWindow())))); + std::max(0.0, 1.0 - std::exp(-4.0 * (DT_s(m_fps_counter.GetLastRawDt()) / + DT_s(m_fps_counter.GetSampleWindow())))); if (std::isfinite(m_graph_max_time)) m_graph_max_time += a * (target_max_time - m_graph_max_time); -- cgit v1.2.3