Skip to content
Permalink
Browse files

VideoCommon: add EFB peek/poke stats

  • Loading branch information...
Tilka committed Mar 4, 2019
1 parent 13b2b93 commit 05fa667d036b0e2aeec71c4c51cff9687de6f477
@@ -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,24 +118,28 @@ 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);
}
break;

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;

@@ -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

@@ -61,6 +61,9 @@ struct Statistics
int numVerticesLoaded;
int tevPixelsIn;
int tevPixelsOut;

int numEFBPeeks;
int numEFBPokes;
};
ThisFrame thisFrame;
void ResetFrame();

0 comments on commit 05fa667

Please sign in to comment.
You can’t perform that action at this time.