VideoCommon: Add statistics for draw done and token commands
This commit is contained in:
parent
f106bc150a
commit
39569392bd
|
@ -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())
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue