Skip to content

Commit

Permalink
Merge pull request #12160 from unknownbrackets/ge-pause
Browse files Browse the repository at this point in the history
GPU: Forget pause signal on new list
  • Loading branch information
hrydgard authored Jul 7, 2019
2 parents 82119ed + c87d5a6 commit ba09e7f
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions GPU/GPUCommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -720,6 +720,8 @@ u32 GPUCommon::EnqueueList(u32 listpc, u32 stall, int subIntrBase, PSPPointer<Ps
if (currentList->state != PSP_GE_DL_STATE_PAUSED)
return SCE_KERNEL_ERROR_INVALID_VALUE;
currentList->state = PSP_GE_DL_STATE_QUEUED;
// Make sure we clear the signal so we don't try to pause it again.
currentList->signal = PSP_GE_SIGNAL_NONE;
}

dl.state = PSP_GE_DL_STATE_PAUSED;
Expand Down Expand Up @@ -786,8 +788,7 @@ u32 GPUCommon::Continue() {

if (currentList->state == PSP_GE_DL_STATE_PAUSED)
{
if (!isbreak)
{
if (!isbreak) {
// TODO: Supposedly this returns SCE_KERNEL_ERROR_BUSY in some case, previously it had
// currentList->signal == PSP_GE_SIGNAL_HANDLER_PAUSE, but it doesn't reproduce.

Expand All @@ -799,9 +800,10 @@ u32 GPUCommon::Continue() {

// We have a list now, so it's not complete.
drawCompleteTicks = (u64)-1;
}
else
} else {
currentList->state = PSP_GE_DL_STATE_QUEUED;
currentList->signal = PSP_GE_SIGNAL_NONE;
}
}
else if (currentList->state == PSP_GE_DL_STATE_RUNNING)
{
Expand Down Expand Up @@ -2446,6 +2448,14 @@ void GPUCommon::InterruptEnd(int listid) {
}
dl.waitTicks = 0;
__GeTriggerWait(GPU_SYNC_LIST, listid);

// Make sure the list isn't still queued since it's now completed.
if (!dlQueue.empty()) {
if (listid == dlQueue.front())
PopDLQueue();
else
dlQueue.remove(listid);
}
}

ProcessDLQueue();
Expand Down

0 comments on commit ba09e7f

Please sign in to comment.