diff --git a/GPU/Common/FramebufferManagerCommon.cpp b/GPU/Common/FramebufferManagerCommon.cpp index 92da28b882..95be5742fa 100644 --- a/GPU/Common/FramebufferManagerCommon.cpp +++ b/GPU/Common/FramebufferManagerCommon.cpp @@ -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); } diff --git a/GPU/Debugger/Debugger.cpp b/GPU/Debugger/Debugger.cpp index 04fb647f1d..439c763e8e 100644 --- a/GPU/Debugger/Debugger.cpp +++ b/GPU/Debugger/Debugger.cpp @@ -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; } diff --git a/GPU/Debugger/Debugger.h b/GPU/Debugger/Debugger.h index 43ec3174b9..b17c6b4ad0 100644 --- a/GPU/Debugger/Debugger.h +++ b/GPU/Debugger/Debugger.h @@ -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(); diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index ea6bab864f..9358a99ed9 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -1109,6 +1109,7 @@ void GPUCommon::BeginFrame() { } else if (dumpThisFrame_) { dumpThisFrame_ = false; } + GPUDebug::NotifyBeginFrame(); GPURecord::NotifyBeginFrame(); } diff --git a/GPU/Vulkan/GPU_Vulkan.cpp b/GPU/Vulkan/GPU_Vulkan.cpp index ee902e92f6..fa1024670b 100644 --- a/GPU/Vulkan/GPU_Vulkan.cpp +++ b/GPU/Vulkan/GPU_Vulkan.cpp @@ -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(); diff --git a/Windows/GEDebugger/GEDebugger.cpp b/Windows/GEDebugger/GEDebugger.cpp index 49ecc6af4e..7c78dcf80e 100644 --- a/Windows/GEDebugger/GEDebugger.cpp +++ b/Windows/GEDebugger/GEDebugger.cpp @@ -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; diff --git a/Windows/ppsspp.rc b/Windows/ppsspp.rc index e2f38fd8e6..3bc7dfed34 100644 --- a/Windows/ppsspp.rc +++ b/Windows/ppsspp.rc @@ -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 diff --git a/Windows/resource.h b/Windows/resource.h index eacb42760b..13104152e9 100644 --- a/Windows/resource.h +++ b/Windows/resource.h @@ -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