mirror of
https://github.com/libretro/ppsspp.git
synced 2025-01-24 18:15:49 +00:00
A paused list will allow a context save.
Just not stall, drawing, etc.
This commit is contained in:
parent
db1f2f2535
commit
881cefbc83
@ -498,7 +498,7 @@ u32 sceGeSaveContext(u32 ctxAddr)
|
||||
DEBUG_LOG(SCEGE, "sceGeSaveContext(%08x)", ctxAddr);
|
||||
gpu->SyncThread();
|
||||
|
||||
if (gpu->DrawSync(1) != PSP_GE_LIST_COMPLETED)
|
||||
if (gpu->BusyDrawing())
|
||||
{
|
||||
WARN_LOG(SCEGE, "sceGeSaveContext(%08x): lists in process, aborting", ctxAddr);
|
||||
// Real error code.
|
||||
@ -521,7 +521,7 @@ u32 sceGeRestoreContext(u32 ctxAddr)
|
||||
DEBUG_LOG(SCEGE, "sceGeRestoreContext(%08x)", ctxAddr);
|
||||
gpu->SyncThread();
|
||||
|
||||
if (gpu->DrawSync(1) != PSP_GE_LIST_COMPLETED)
|
||||
if (gpu->BusyDrawing())
|
||||
{
|
||||
WARN_LOG(SCEGE, "sceGeRestoreContext(%08x): lists in process, aborting", ctxAddr);
|
||||
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) {
|
||||
// FIXME: Workaround for displaylists sometimes hanging unprocessed. Not yet sure of the cause.
|
||||
if (g_Config.bSeparateCPUThread) {
|
||||
|
@ -44,6 +44,7 @@ public:
|
||||
SyncThread();
|
||||
return true;
|
||||
}
|
||||
virtual bool BusyDrawing();
|
||||
virtual u32 Continue();
|
||||
virtual u32 Break(int mode);
|
||||
virtual void ReapplyGfxState();
|
||||
|
@ -237,6 +237,7 @@ public:
|
||||
virtual void Resized() = 0;
|
||||
virtual bool FramebufferDirty() = 0;
|
||||
virtual bool FramebufferReallyDirty() = 0;
|
||||
virtual bool BusyDrawing() = 0;
|
||||
|
||||
// Debugging
|
||||
virtual void DumpNextFrame() = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user