mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-15 18:49:51 +01:00
GE Debugger: Track a counter of prims.
This commit is contained in:
1 parent
571ea0eec5
commit
4d5c8fcff4
6 files changed
+42
-9
No files matched your search
@@ -26,6 +26,10 @@ static bool active = false;
|
||||
static bool inited = false;
|
||||
static BreakNext breakNext = BreakNext::NONE;
|
||||
|
||||
static int primsLastFrame = 0;
|
||||
static int primsThisFrame = 0;
|
||||
static int thisFlipNum = 0;
|
||||
|
||||
static void Init() {
|
||||
if (!inited) {
|
||||
GPUBreakpoints::Init();
|
||||
@@ -68,6 +72,16 @@ void NotifyCommand(u32 pc) {
|
||||
if (!active)
|
||||
return;
|
||||
u32 op = Memory::ReadUnchecked_U32(pc);
|
||||
u32 cmd = op >> 24;
|
||||
if (thisFlipNum != gpuStats.numFlips) {
|
||||
primsLastFrame = primsThisFrame;
|
||||
primsThisFrame = 0;
|
||||
thisFlipNum = gpuStats.numFlips;
|
||||
}
|
||||
if (cmd == GE_CMD_PRIM || cmd == GE_CMD_BEZIER || cmd == GE_CMD_SPLINE) {
|
||||
primsThisFrame++;
|
||||
}
|
||||
|
||||
if (breakNext == BreakNext::OP || GPUBreakpoints::IsBreakpoint(pc, op)) {
|
||||
GPUBreakpoints::ClearTempBreakpoints();
|
||||
|
||||
@@ -100,4 +114,12 @@ void NotifyTextureAttachment(u32 texaddr) {
|
||||
return;
|
||||
}
|
||||
|
||||
int PrimsThisFrame() {
|
||||
return primsThisFrame;
|
||||
}
|
||||
|
||||
int PrimsLastFrame() {
|
||||
return primsLastFrame;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -43,4 +43,7 @@ void NotifyDraw();
|
||||
void NotifyDisplay(u32 framebuf, u32 stride, int format);
|
||||
void NotifyTextureAttachment(u32 texaddr);
|
||||
|
||||
int PrimsThisFrame();
|
||||
int PrimsLastFrame();
|
||||
|
||||
}
|
||||
@@ -38,6 +38,7 @@ enum PauseAction {
|
||||
};
|
||||
|
||||
static bool isStepping;
|
||||
// Number of times we've entered stepping, to detect a resume asynchronously.
|
||||
static int stepCounter = 0;
|
||||
|
||||
static std::mutex pauseLock;
|
||||
|
||||
Reference in new issue
Block a user