mirror of
https://github.com/stenzek/duckstation.git
synced 2025-12-28 05:24:19 +00:00
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
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:
parent
628e41f849
commit
5c682d2325
@ -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);
|
||||
}
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user