mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Display: Account for stepping time in graphs.
Frame times should count that as sleep too.
This commit is contained in:
parent
48b597a1b9
commit
129a603832
2 changed files with 6 additions and 0 deletions
|
@ -39,6 +39,7 @@
|
|||
#include "Core/SaveState.h"
|
||||
#include "Core/System.h"
|
||||
#include "Core/Debugger/Breakpoints.h"
|
||||
#include "Core/HW/Display.h"
|
||||
#include "Core/MIPS/MIPS.h"
|
||||
#include "GPU/Debugger/Stepping.h"
|
||||
|
||||
|
@ -279,8 +280,11 @@ void Core_SingleStep() {
|
|||
static inline bool Core_WaitStepping() {
|
||||
std::unique_lock<std::mutex> guard(m_hStepMutex);
|
||||
// We only wait 16ms so that we can still draw UI or react to events.
|
||||
double sleepStart = time_now_d();
|
||||
if (!singleStepPending && coreState == CORE_STEPPING)
|
||||
m_StepCond.wait_for(guard, std::chrono::milliseconds(16));
|
||||
double sleepEnd = time_now_d();
|
||||
DisplayNotifySleep(sleepEnd - sleepStart);
|
||||
|
||||
bool result = singleStepPending;
|
||||
singleStepPending = false;
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "Core/HLE/sceKernelInterrupt.h"
|
||||
#include "Core/HLE/sceKernelThread.h"
|
||||
#include "Core/HLE/sceGe.h"
|
||||
#include "Core/HW/Display.h"
|
||||
#include "Core/MemMapHelpers.h"
|
||||
#include "Core/Util/PPGeDraw.h"
|
||||
#include "GPU/Common/DrawEngineCommon.h"
|
||||
|
@ -1032,6 +1033,7 @@ bool GPUCommon::InterpretList(DisplayList &list) {
|
|||
double total = time_now_d() - start - timeSpentStepping_;
|
||||
_dbg_assert_msg_(total >= 0.0, "Time spent DL processing became negative");
|
||||
hleSetSteppingTime(timeSpentStepping_);
|
||||
DisplayNotifySleep(timeSpentStepping_);
|
||||
timeSpentStepping_ = 0.0;
|
||||
gpuStats.msProcessingDisplayLists += total;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue