mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-04 19:53:48 +01:00
Simplify UpdatePC() a bit more.
This commit is contained in:
1 parent
cbb6c01d4c
commit
82df1b1fa8
2 files changed
+6
-3
No files matched your search
+2
-2
@@ -561,7 +561,7 @@ void GPUCommon::UpdatePC(u32 currentPC, u32 newPC) {
|
||||
// Rough estimate, 2 CPU ticks (it's double the clock rate) per GPU instruction.
|
||||
u32 executed = (currentPC - cycleLastPC) / 4;
|
||||
cyclesExecuted += 2 * executed;
|
||||
cycleLastPC = newPC == 0 ? currentPC : newPC;
|
||||
cycleLastPC = currentPC;
|
||||
|
||||
if (g_Config.bShowDebugStats) {
|
||||
gpuStats.otherGPUCycles += 2 * executed;
|
||||
@@ -571,7 +571,7 @@ void GPUCommon::UpdatePC(u32 currentPC, u32 newPC) {
|
||||
// Exit the runloop and recalculate things. This happens a lot in some games.
|
||||
easy_guard innerGuard(listLock);
|
||||
if (currentList)
|
||||
downcount = currentList->stall == 0 ? 0x0FFFFFFF : (currentList->stall - cycleLastPC) / 4;
|
||||
downcount = currentList->stall == 0 ? 0x0FFFFFFF : (currentList->stall - currentPC) / 4;
|
||||
else
|
||||
downcount = 0;
|
||||
}
|
||||
|
||||
+4
-1
@@ -81,7 +81,10 @@ protected:
|
||||
// To avoid virtual calls to PreExecuteOp().
|
||||
virtual void FastRunLoop(DisplayList &list) = 0;
|
||||
void SlowRunLoop(DisplayList &list);
|
||||
void UpdatePC(u32 currentPC, u32 newPC = 0);
|
||||
void UpdatePC(u32 currentPC, u32 newPC);
|
||||
void UpdatePC(u32 currentPC) {
|
||||
UpdatePC(currentPC, currentPC);
|
||||
}
|
||||
void UpdateState(GPUState state);
|
||||
void PopDLQueue();
|
||||
void CheckDrawSync();
|
||||
|
||||
Reference in new issue
Block a user