GE Debugger: Skip overhead without breakpoints.

In the common case that there's no breakpoints, we can skip most of the
checks and a call.
This commit is contained in:
Unknown W. Brackets committed 2022-02-07 23:54:18 -08:00
1 parent 50350e13ac
commit da4206b078
3 files changed
+44 -6

No files matched your search

+6 -2
View File
@@ -29,6 +29,7 @@ static bool active = false;
static bool inited = false;
static BreakNext breakNext = BreakNext::NONE;
static int breakAtCount = -1;
static bool hasBreakpoints = false;
static int primsLastFrame = 0;
static int primsThisFrame = 0;
@@ -39,7 +40,9 @@ static std::string restrictPrimRule;
static void Init() {
if (!inited) {
GPUBreakpoints::Init();
GPUBreakpoints::Init([](bool flag) {
hasBreakpoints = flag;
});
Core_ListenStopRequest(&GPUStepping::ForceUnpause);
inited = true;
}
@@ -90,9 +93,10 @@ static bool IsBreakpoint(u32 pc, u32 op) {
return true;
} else if (breakNext == BreakNext::COUNT) {
return primsThisFrame == breakAtCount;
} else {
} else if (hasBreakpoints) {
return GPUBreakpoints::IsBreakpoint(pc, op);
}
return false;
}
bool NotifyCommand(u32 pc) {