mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Simplify UpdatePC() a bit more.
This commit is contained in:
parent
cbb6c01d4c
commit
82df1b1fa8
2 changed files with 6 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Add table
Reference in a new issue