Skip to content
Permalink
Browse files

Merge pull request #12160 from unknownbrackets/ge-pause

GPU: Forget pause signal on new list
  • Loading branch information...
hrydgard committed Jul 7, 2019
2 parents 82119ed + c87d5a6 commit ba09e7fb3220cc4bc5af5df63059f95a9c9fae4f
Showing with 14 additions and 4 deletions.
  1. +14 −4 GPU/GPUCommon.cpp
@@ -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;
@@ -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.

@@ -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)
{
@@ -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();

0 comments on commit ba09e7f

Please sign in to comment.
You can’t perform that action at this time.