diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index b806bf654d..35f2f23ffe 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -33,6 +33,7 @@ #include "VideoCommon/PixelEngine.h" #include "VideoCommon/PixelShaderManager.h" #include "VideoCommon/RenderBase.h" +#include "VideoCommon/Statistics.h" #include "VideoCommon/TMEM.h" #include "VideoCommon/TextureCacheBase.h" #include "VideoCommon/TextureDecoder.h" @@ -177,6 +178,7 @@ static void BPWritten(const BPCmd& bp, int cycles_into_future) switch (bp.newvalue & 0xFF) { case 0x02: + INCSTAT(g_stats.this_frame.num_draw_done); g_texture_cache->FlushEFBCopies(); g_framebuffer_manager->InvalidatePeekCache(false); if (!Fifo::UseDeterministicGPUThread()) @@ -190,6 +192,7 @@ static void BPWritten(const BPCmd& bp, int cycles_into_future) } return; case BPMEM_PE_TOKEN_ID: // Pixel Engine Token ID + INCSTAT(g_stats.this_frame.num_token); g_texture_cache->FlushEFBCopies(); g_framebuffer_manager->InvalidatePeekCache(false); if (!Fifo::UseDeterministicGPUThread()) @@ -197,6 +200,7 @@ static void BPWritten(const BPCmd& bp, int cycles_into_future) DEBUG_LOG_FMT(VIDEO, "SetPEToken {:#06X}", bp.newvalue & 0xFFFF); return; case BPMEM_PE_TOKEN_INT_ID: // Pixel Engine Interrupt Token ID + INCSTAT(g_stats.this_frame.num_token_int); g_texture_cache->FlushEFBCopies(); g_framebuffer_manager->InvalidatePeekCache(false); if (!Fifo::UseDeterministicGPUThread()) diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp index 7b4a785c6f..a6b7eb8167 100644 --- a/Source/Core/VideoCommon/Statistics.cpp +++ b/Source/Core/VideoCommon/Statistics.cpp @@ -93,6 +93,8 @@ void Statistics::Display() const draw_statistic("Vertex Loaders", "%d", num_vertex_loaders); draw_statistic("EFB peeks:", "%d", this_frame.num_efb_peeks); draw_statistic("EFB pokes:", "%d", this_frame.num_efb_pokes); + draw_statistic("Draw dones:", "%d", this_frame.num_draw_done); + draw_statistic("Tokens:", "%d/%d", this_frame.num_token, this_frame.num_token_int); ImGui::Columns(1); diff --git a/Source/Core/VideoCommon/Statistics.h b/Source/Core/VideoCommon/Statistics.h index c6453039ae..5d0a1669f8 100644 --- a/Source/Core/VideoCommon/Statistics.h +++ b/Source/Core/VideoCommon/Statistics.h @@ -71,6 +71,10 @@ struct Statistics int num_efb_peeks; int num_efb_pokes; + + int num_draw_done; + int num_token; + int num_token_int; }; ThisFrame this_frame; void ResetFrame();