A paused list will allow a context save.
Just not stall, drawing, etc.
This commit is contained in:
parent
db1f2f2535
commit
881cefbc83
4 changed files with 15 additions and 2 deletions
|
@ -498,7 +498,7 @@ u32 sceGeSaveContext(u32 ctxAddr)
|
||||||
DEBUG_LOG(SCEGE, "sceGeSaveContext(%08x)", ctxAddr);
|
DEBUG_LOG(SCEGE, "sceGeSaveContext(%08x)", ctxAddr);
|
||||||
gpu->SyncThread();
|
gpu->SyncThread();
|
||||||
|
|
||||||
if (gpu->DrawSync(1) != PSP_GE_LIST_COMPLETED)
|
if (gpu->BusyDrawing())
|
||||||
{
|
{
|
||||||
WARN_LOG(SCEGE, "sceGeSaveContext(%08x): lists in process, aborting", ctxAddr);
|
WARN_LOG(SCEGE, "sceGeSaveContext(%08x): lists in process, aborting", ctxAddr);
|
||||||
// Real error code.
|
// Real error code.
|
||||||
|
@ -521,7 +521,7 @@ u32 sceGeRestoreContext(u32 ctxAddr)
|
||||||
DEBUG_LOG(SCEGE, "sceGeRestoreContext(%08x)", ctxAddr);
|
DEBUG_LOG(SCEGE, "sceGeRestoreContext(%08x)", ctxAddr);
|
||||||
gpu->SyncThread();
|
gpu->SyncThread();
|
||||||
|
|
||||||
if (gpu->DrawSync(1) != PSP_GE_LIST_COMPLETED)
|
if (gpu->BusyDrawing())
|
||||||
{
|
{
|
||||||
WARN_LOG(SCEGE, "sceGeRestoreContext(%08x): lists in process, aborting", ctxAddr);
|
WARN_LOG(SCEGE, "sceGeRestoreContext(%08x): lists in process, aborting", ctxAddr);
|
||||||
return SCE_KERNEL_ERROR_BUSY;
|
return SCE_KERNEL_ERROR_BUSY;
|
||||||
|
|
|
@ -48,6 +48,17 @@ void GPUCommon::PopDLQueue() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GPUCommon::BusyDrawing() {
|
||||||
|
u32 state = DrawSync(1);
|
||||||
|
if (state == PSP_GE_LIST_DRAWING || state == PSP_GE_LIST_STALLING) {
|
||||||
|
lock_guard guard(listLock);
|
||||||
|
if (currentList && currentList->state != PSP_GE_DL_STATE_PAUSED) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
u32 GPUCommon::DrawSync(int mode) {
|
u32 GPUCommon::DrawSync(int mode) {
|
||||||
// FIXME: Workaround for displaylists sometimes hanging unprocessed. Not yet sure of the cause.
|
// FIXME: Workaround for displaylists sometimes hanging unprocessed. Not yet sure of the cause.
|
||||||
if (g_Config.bSeparateCPUThread) {
|
if (g_Config.bSeparateCPUThread) {
|
||||||
|
|
|
@ -44,6 +44,7 @@ public:
|
||||||
SyncThread();
|
SyncThread();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
virtual bool BusyDrawing();
|
||||||
virtual u32 Continue();
|
virtual u32 Continue();
|
||||||
virtual u32 Break(int mode);
|
virtual u32 Break(int mode);
|
||||||
virtual void ReapplyGfxState();
|
virtual void ReapplyGfxState();
|
||||||
|
|
|
@ -237,6 +237,7 @@ public:
|
||||||
virtual void Resized() = 0;
|
virtual void Resized() = 0;
|
||||||
virtual bool FramebufferDirty() = 0;
|
virtual bool FramebufferDirty() = 0;
|
||||||
virtual bool FramebufferReallyDirty() = 0;
|
virtual bool FramebufferReallyDirty() = 0;
|
||||||
|
virtual bool BusyDrawing() = 0;
|
||||||
|
|
||||||
// Debugging
|
// Debugging
|
||||||
virtual void DumpNextFrame() = 0;
|
virtual void DumpNextFrame() = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue