mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-10 21:16:24 +02: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;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user