summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorTillmann Karras <tilkax@gmail.com>2019-03-04 01:25:33 +0000
committerTillmann Karras <tilkax@gmail.com>2019-03-04 02:49:59 +0000
commit05fa667d036b0e2aeec71c4c51cff9687de6f477 (patch)
tree69ed5e7902c8fc72fd3092e1efbd5f064e59d0da /Source/Core
parent13b2b93d3d12e4c8491ed82c63d52a24a4849476 (diff)
VideoCommon: add EFB peek/poke stats
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoCommon/AsyncRequests.cpp5
-rw-r--r--Source/Core/VideoCommon/Statistics.cpp2
-rw-r--r--Source/Core/VideoCommon/Statistics.h3
3 files changed, 10 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/AsyncRequests.cpp b/Source/Core/VideoCommon/AsyncRequests.cpp
index e5d0bb3c27..28769925c9 100644
--- a/Source/Core/VideoCommon/AsyncRequests.cpp
+++ b/Source/Core/VideoCommon/AsyncRequests.cpp
@@ -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;
diff --git a/Source/Core/VideoCommon/Statistics.cpp b/Source/Core/VideoCommon/Statistics.cpp
index af122bfcdb..716dee4f73 100644
--- a/Source/Core/VideoCommon/Statistics.cpp
+++ b/Source/Core/VideoCommon/Statistics.cpp
@@ -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
diff --git a/Source/Core/VideoCommon/Statistics.h b/Source/Core/VideoCommon/Statistics.h
index c743bf7f08..431df7d9de 100644
--- a/Source/Core/VideoCommon/Statistics.h
+++ b/Source/Core/VideoCommon/Statistics.h
@@ -61,6 +61,9 @@ struct Statistics
int numVerticesLoaded;
int tevPixelsIn;
int tevPixelsOut;
+
+ int numEFBPeeks;
+ int numEFBPokes;
};
ThisFrame thisFrame;
void ResetFrame();