mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-10-07 10:53:31 +00:00
GE Debugger: Add separate step based on vsync.
I think there were some games where this would step in the middle of a frame, but not seeing it commonly now. So make it the default, but allow both methods in the menu. Fixes #15893.
This commit is contained in:
parent
c581a83896
commit
a901fa4315
@ -106,8 +106,6 @@ void FramebufferManagerCommon::SetDisplayFramebuffer(u32 framebuf, u32 stride, G
|
||||
displayFramebufPtr_ = framebuf;
|
||||
displayStride_ = stride;
|
||||
displayFormat_ = format;
|
||||
// TODO: Some games like Spongebob - Yellow Avenger, never change framebuffer, they blit to it.
|
||||
// So breaking on frames doesn't work. Might want to move this to sceDisplay vsync.
|
||||
GPUDebug::NotifyDisplay(framebuf, stride, format);
|
||||
GPURecord::NotifyDisplay(framebuf, stride, format);
|
||||
}
|
||||
|
@ -154,6 +154,15 @@ void NotifyDisplay(u32 framebuf, u32 stride, int format) {
|
||||
}
|
||||
}
|
||||
|
||||
void NotifyBeginFrame() {
|
||||
if (!active)
|
||||
return;
|
||||
if (breakNext == BreakNext::VSYNC) {
|
||||
// Just start stepping as soon as we can once the vblank finishes.
|
||||
breakNext = BreakNext::OP;
|
||||
}
|
||||
}
|
||||
|
||||
int PrimsThisFrame() {
|
||||
return primsThisFrame;
|
||||
}
|
||||
|
@ -28,6 +28,7 @@ enum class BreakNext {
|
||||
TEX,
|
||||
NONTEX,
|
||||
FRAME,
|
||||
VSYNC,
|
||||
PRIM,
|
||||
CURVE,
|
||||
COUNT,
|
||||
@ -43,6 +44,7 @@ void SetBreakCount(int c, bool relative = false);
|
||||
bool NotifyCommand(u32 pc);
|
||||
void NotifyDraw();
|
||||
void NotifyDisplay(u32 framebuf, u32 stride, int format);
|
||||
void NotifyBeginFrame();
|
||||
|
||||
int PrimsThisFrame();
|
||||
int PrimsLastFrame();
|
||||
|
@ -1109,6 +1109,7 @@ void GPUCommon::BeginFrame() {
|
||||
} else if (dumpThisFrame_) {
|
||||
dumpThisFrame_ = false;
|
||||
}
|
||||
GPUDebug::NotifyBeginFrame();
|
||||
GPURecord::NotifyBeginFrame();
|
||||
}
|
||||
|
||||
|
@ -430,10 +430,6 @@ void GPU_Vulkan::InitClear() {
|
||||
}
|
||||
}
|
||||
|
||||
void GPU_Vulkan::SetDisplayFramebuffer(u32 framebuf, u32 stride, GEBufferFormat format) {
|
||||
framebufferManager_->SetDisplayFramebuffer(framebuf, stride, format);
|
||||
}
|
||||
|
||||
void GPU_Vulkan::CopyDisplayToOutput(bool reallyDirty) {
|
||||
// Flush anything left over.
|
||||
drawEngine_.Flush();
|
||||
|
@ -979,6 +979,10 @@ BOOL CGEDebugger::DlgProc(UINT message, WPARAM wParam, LPARAM lParam) {
|
||||
SetBreakNext(BreakNext::FRAME);
|
||||
break;
|
||||
|
||||
case IDC_GEDBG_STEPVSYNC:
|
||||
SetBreakNext(BreakNext::VSYNC);
|
||||
break;
|
||||
|
||||
case IDC_GEDBG_STEPPRIM:
|
||||
SetBreakNext(BreakNext::PRIM);
|
||||
break;
|
||||
|
@ -202,7 +202,7 @@ EXSTYLE WS_EX_ACCEPTFILES | WS_EX_TOOLWINDOW
|
||||
CAPTION "GE"
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
PUSHBUTTON "Step &Frame",IDC_GEDBG_STEPFRAME,10,2,44,14
|
||||
PUSHBUTTON "Step &Frame",IDC_GEDBG_STEPVSYNC,10,2,44,14
|
||||
PUSHBUTTON "Step &Tex",IDC_GEDBG_STEPTEX,60,2,44,14
|
||||
PUSHBUTTON "Step &Draw",IDC_GEDBG_STEPDRAW,105,2,44,14
|
||||
PUSHBUTTON "Step &Prim",IDC_GEDBG_STEPPRIM,150,2,44,14
|
||||
@ -679,7 +679,8 @@ BEGIN
|
||||
MENUITEM "Next &Curve", IDC_GEDBG_STEPCURVE
|
||||
MENUITEM "Next &Texture", IDC_GEDBG_STEPTEX
|
||||
MENUITEM "Next &Draw Flush", IDC_GEDBG_STEPDRAW
|
||||
MENUITEM "Next &Frame", IDC_GEDBG_STEPFRAME
|
||||
MENUITEM "Next Display &Framebuf", IDC_GEDBG_STEPFRAME
|
||||
MENUITEM "Next &Vsync Frame", IDC_GEDBG_STEPVSYNC
|
||||
MENUITEM "", 0, MFT_SEPARATOR
|
||||
MENUITEM "&Auto Flush Pending", IDC_GEDBG_FLUSHAUTO
|
||||
END
|
||||
|
@ -331,6 +331,7 @@
|
||||
#define ID_GEDBG_SHOWONLEFT 40219
|
||||
#define ID_GEDBG_SHOWONRIGHT 40220
|
||||
#define ID_GEDBG_SHOWONTOPRIGHT 40221
|
||||
#define IDC_GEDBG_STEPVSYNC 40222
|
||||
|
||||
|
||||
// Dummy option to let the buffered rendering hotkey cycle through all the options.
|
||||
@ -344,7 +345,7 @@
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 256
|
||||
#define _APS_NEXT_COMMAND_VALUE 40222
|
||||
#define _APS_NEXT_COMMAND_VALUE 40223
|
||||
#define _APS_NEXT_CONTROL_VALUE 1202
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user