Merge pull request #7851 from Tilka/efb_stats

VideoCommon: add EFB peek/poke stats
This commit is contained in:
Connor McLaughlin 2019-03-04 15:28:22 +10:00 committed by GitHub
commit a59010fa29
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

View File

@ -7,6 +7,7 @@
#include "VideoCommon/AsyncRequests.h"
#include "VideoCommon/Fifo.h"
#include "VideoCommon/RenderBase.h"
#include "VideoCommon/Statistics.h"
#include "VideoCommon/VertexManagerBase.h"
#include "VideoCommon/VideoBackendBase.h"
#include "VideoCommon/VideoCommon.h"
@ -117,6 +118,7 @@ void AsyncRequests::HandleEvent(const AsyncRequests::Event& e)
{
case Event::EFB_POKE_COLOR:
{
INCSTAT(stats.thisFrame.numEFBPokes);
EfbPokeData poke = {e.efb_poke.x, e.efb_poke.y, e.efb_poke.data};
g_renderer->PokeEFB(EFBAccessType::PokeColor, &poke, 1);
}
@ -124,17 +126,20 @@ void AsyncRequests::HandleEvent(const AsyncRequests::Event& e)
case Event::EFB_POKE_Z:
{
INCSTAT(stats.thisFrame.numEFBPokes);
EfbPokeData poke = {e.efb_poke.x, e.efb_poke.y, e.efb_poke.data};
g_renderer->PokeEFB(EFBAccessType::PokeZ, &poke, 1);
}
break;
case Event::EFB_PEEK_COLOR:
INCSTAT(stats.thisFrame.numEFBPeeks);
*e.efb_peek.data =
g_renderer->AccessEFB(EFBAccessType::PeekColor, e.efb_peek.x, e.efb_peek.y, 0);
break;
case Event::EFB_PEEK_Z:
INCSTAT(stats.thisFrame.numEFBPeeks);
*e.efb_peek.data = g_renderer->AccessEFB(EFBAccessType::PeekZ, e.efb_peek.x, e.efb_peek.y, 0);
break;

View File

@ -85,6 +85,8 @@ void Statistics::Display()
DRAW_STAT("Index streamed", "%i kB", stats.thisFrame.bytesIndexStreamed / 1024);
DRAW_STAT("Uniform streamed", "%i kB", stats.thisFrame.bytesUniformStreamed / 1024);
DRAW_STAT("Vertex Loaders", "%d", stats.numVertexLoaders);
DRAW_STAT("EFB peeks:", "%d", stats.thisFrame.numEFBPeeks);
DRAW_STAT("EFB pokes:", "%d", stats.thisFrame.numEFBPokes);
#undef DRAW_STAT

View File

@ -61,6 +61,9 @@ struct Statistics
int numVerticesLoaded;
int tevPixelsIn;
int tevPixelsOut;
int numEFBPeeks;
int numEFBPokes;
};
ThisFrame thisFrame;
void ResetFrame();