ImGuiOverlays: Frame time history is aligned
Some checks failed
Automated Builds / 💻 Windows (push) Waiting to run
Automated Builds / 🐧 Linux AppImage (push) Waiting to run
Automated Builds / 🐧 Linux Cross-Compiled AppImage (push) Waiting to run
Automated Builds / 📦 Linux Flatpak (push) Waiting to run
Automated Builds / 🍎 MacOS (push) Waiting to run
Automated Builds / 📤 Create Release (push) Blocked by required conditions
GameDB Lint / gamedb-lint (push) Has been cancelled
Translation Lint / translation-lint (push) Has been cancelled

This commit is contained in:
Stenzek 2025-08-02 17:44:53 +10:00
parent 628e41f849
commit 5c682d2325
No known key found for this signature in database
2 changed files with 5 additions and 5 deletions

View File

@ -710,11 +710,11 @@ void ImGuiManager::DrawFrameTimeOverlay(float& position_y, float scale, float ma
{
const PerformanceCounters::FrameTimeHistory& history = PerformanceCounters::GetFrameTimeHistory();
static_assert((PerformanceCounters::NUM_FRAME_TIME_SAMPLES % 4) == 0);
GSVector4 vmin = GSVector4::load<false>(history.data());
GSVector4 vmin = GSVector4::load<true>(history.data());
GSVector4 vmax = vmin;
for (size_t i = 4; i < history.size(); i += 4)
{
const GSVector4 v = GSVector4::load<false>(&history[i]);
const GSVector4 v = GSVector4::load<true>(&history[i]);
vmin = vmin.min(v);
vmax = vmax.max(v);
}

View File

@ -7,8 +7,8 @@
class GPUBackend;
namespace PerformanceCounters
{
namespace PerformanceCounters {
inline constexpr u32 NUM_FRAME_TIME_SAMPLES = 152;
using FrameTimeHistory = std::array<float, NUM_FRAME_TIME_SAMPLES>;
@ -32,4 +32,4 @@ void Reset();
void Update(GPUBackend* gpu, u32 frame_number, u32 internal_frame_number);
void AccumulateGPUTime();
} // namespace Host
} // namespace PerformanceCounters