Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GPU: Forget pause signal on new list #12160

Merged
merged 1 commit into from
Jul 7, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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