mirror of https://github.com/PCSX2/pcsx2.git
ImGuiOverlays: Display vsync queue size in OSD
This commit is contained in:
parent
256babd337
commit
82fbf34f5b
|
@ -190,8 +190,10 @@ __ri void ImGuiManager::DrawPerformanceOverlay(float& position_y, float scale, f
|
|||
if (GSConfig.OsdShowCPU)
|
||||
{
|
||||
text.clear();
|
||||
text.append_format("{:.2f}ms | {:.2f}ms | {:.2f}ms", PerformanceMetrics::GetMinimumFrameTime(),
|
||||
PerformanceMetrics::GetAverageFrameTime(), PerformanceMetrics::GetMaximumFrameTime());
|
||||
text.append_format("{} QF | {:.2f}ms | {:.2f}ms | {:.2f}ms",
|
||||
MTGS::GetCurrentVsyncQueueSize() - 1, // we subtract one for the current frame
|
||||
PerformanceMetrics::GetMinimumFrameTime(), PerformanceMetrics::GetAverageFrameTime(),
|
||||
PerformanceMetrics::GetMaximumFrameTime());
|
||||
DRAW_LINE(fixed_font, text.c_str(), IM_COL32(255, 255, 255, 255));
|
||||
|
||||
text.clear();
|
||||
|
|
|
@ -213,6 +213,11 @@ void MTGS::ResetGS(bool hardware_reset)
|
|||
SetEvent();
|
||||
}
|
||||
|
||||
int MTGS::GetCurrentVsyncQueueSize()
|
||||
{
|
||||
return s_QueuedFrameCount.load(std::memory_order_acquire);
|
||||
}
|
||||
|
||||
struct RingCmdPacket_Vsync
|
||||
{
|
||||
u8 regset1[0x0f0];
|
||||
|
|
|
@ -62,6 +62,7 @@ namespace MTGS
|
|||
void WaitForClose();
|
||||
void Freeze(FreezeAction mode, FreezeData& data);
|
||||
|
||||
int GetCurrentVsyncQueueSize();
|
||||
void PostVsyncStart(bool registers_written);
|
||||
void InitAndReadFIFO(u8* mem, u32 qwc);
|
||||
|
||||
|
|
Loading…
Reference in New Issue