Permalink
Browse files

Debugger: Prevent record with no commands.

Should cut down on empty dumps, at least.
  • Loading branch information...
unknownbrackets committed Sep 1, 2018
1 parent f1afc51 commit c10b2035b5739d1ed8f00be2891f41411325e77a
Showing with 9 additions and 3 deletions.
  1. +2 −1 Core/HLE/sceDisplay.cpp
  2. +6 −2 GPU/Debugger/Record.cpp
  3. +1 −0 GPU/Debugger/Record.h
View
@@ -55,6 +55,7 @@
#include "GPU/GPUInterface.h"
#include "GPU/Common/FramebufferCommon.h"
#include "GPU/Common/PostShader.h"
#include "GPU/Debugger/Record.h"
struct FrameBufferState {
u32 topaddr;
@@ -737,7 +738,7 @@ void __DisplayFlip(int cyclesLate) {
// 4 here means 1 drawn, 4 skipped - so 12 fps minimum.
maxFrameskip = g_Config.iFrameSkip;
}
if (numSkippedFrames >= maxFrameskip) {
if (numSkippedFrames >= maxFrameskip || GPURecord::IsActivePending()) {
skipFrame = false;
}
View
@@ -637,6 +637,10 @@ bool IsActive() {
return active;
}
bool IsActivePending() {
return nextFrame || active;
}
void Activate() {
nextFrame = true;
}
@@ -749,12 +753,12 @@ void NotifyUpload(u32 dest, u32 sz) {
}
void NotifyFrame() {
if (active && !writePending) {
if (active && !writePending && !commands.empty()) {
// Delay write until the first command of the next frame, so we get the right display buf.
NOTICE_LOG(SYSTEM, "Recording complete - waiting to get display buffer");
writePending = true;
}
if (nextFrame) {
if (nextFrame && (gstate_c.skipDrawReason & SKIPDRAW_SKIPFRAME) == 0) {
NOTICE_LOG(SYSTEM, "Recording starting...");
active = true;
nextFrame = false;
View
@@ -23,6 +23,7 @@
namespace GPURecord {
bool IsActive();
bool IsActivePending();
void Activate();
void NotifyCommand(u32 pc);

0 comments on commit c10b203

Please sign in to comment.