From c5a709d03931f26c0c432f46cce9adba95c7d664 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 21 Sep 2013 14:54:07 -0700 Subject: [PATCH] Don't update stall address on completed lists. --- GPU/GPUCommon.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index 874a4dd128..fabe57f93f 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -313,11 +313,14 @@ u32 GPUCommon::UpdateStall(int listid, u32 newstall) { easy_guard guard(listLock); if (listid < 0 || listid >= DisplayListMaxCount || dls[listid].state == PSP_GE_DL_STATE_NONE) return SCE_KERNEL_ERROR_INVALID_ID; + auto &dl = dls[listid]; + if (dl.state == PSP_GE_DL_STATE_COMPLETED) + return SCE_KERNEL_ERROR_ALREADY; - dls[listid].stall = newstall & 0x0FFFFFFF; + dl.stall = newstall & 0x0FFFFFFF; - if (dls[listid].signal == PSP_GE_SIGNAL_HANDLER_PAUSE) - dls[listid].signal = PSP_GE_SIGNAL_HANDLER_SUSPEND; + if (dl.signal == PSP_GE_SIGNAL_HANDLER_PAUSE) + dl.signal = PSP_GE_SIGNAL_HANDLER_SUSPEND; guard.unlock(); ProcessDLQueue();