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)
|
if (GSConfig.OsdShowCPU)
|
||||||
{
|
{
|
||||||
text.clear();
|
text.clear();
|
||||||
text.append_format("{:.2f}ms | {:.2f}ms | {:.2f}ms", PerformanceMetrics::GetMinimumFrameTime(),
|
text.append_format("{} QF | {:.2f}ms | {:.2f}ms | {:.2f}ms",
|
||||||
PerformanceMetrics::GetAverageFrameTime(), PerformanceMetrics::GetMaximumFrameTime());
|
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));
|
DRAW_LINE(fixed_font, text.c_str(), IM_COL32(255, 255, 255, 255));
|
||||||
|
|
||||||
text.clear();
|
text.clear();
|
||||||
|
|
|
@ -213,6 +213,11 @@ void MTGS::ResetGS(bool hardware_reset)
|
||||||
SetEvent();
|
SetEvent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int MTGS::GetCurrentVsyncQueueSize()
|
||||||
|
{
|
||||||
|
return s_QueuedFrameCount.load(std::memory_order_acquire);
|
||||||
|
}
|
||||||
|
|
||||||
struct RingCmdPacket_Vsync
|
struct RingCmdPacket_Vsync
|
||||||
{
|
{
|
||||||
u8 regset1[0x0f0];
|
u8 regset1[0x0f0];
|
||||||
|
|
|
@ -62,6 +62,7 @@ namespace MTGS
|
||||||
void WaitForClose();
|
void WaitForClose();
|
||||||
void Freeze(FreezeAction mode, FreezeData& data);
|
void Freeze(FreezeAction mode, FreezeData& data);
|
||||||
|
|
||||||
|
int GetCurrentVsyncQueueSize();
|
||||||
void PostVsyncStart(bool registers_written);
|
void PostVsyncStart(bool registers_written);
|
||||||
void InitAndReadFIFO(u8* mem, u32 qwc);
|
void InitAndReadFIFO(u8* mem, u32 qwc);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue