From c37566d3bc99f7aeb3ad2d83a4a9c711c175e002 Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Mon, 4 Feb 2013 00:42:52 +0100 Subject: [PATCH] Use proper draw sequence in PPGeDraw --- Core/HLE/sceGe.h | 4 ++++ Core/Util/PPGeDraw.cpp | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Core/HLE/sceGe.h b/Core/HLE/sceGe.h index b37508a672..855f5a7a87 100644 --- a/Core/HLE/sceGe.h +++ b/Core/HLE/sceGe.h @@ -44,5 +44,9 @@ void __GeShutdown(); // Export functions for use by Util/PPGe u32 sceGeRestoreContext(u32 ctxAddr); u32 sceGeSaveContext(u32 ctxAddr); +int sceGeBreak(u32 mode); +int sceGeContinue(); +int sceGeListSync(u32 displayListID, u32 mode); u32 sceGeListEnQueue(u32 listAddress, u32 stallAddress, int callbackId, u32 optParamAddr); +u32 sceGeListEnQueueHead(u32 listAddress, u32 stallAddress, int callbackId, u32 optParamAddr); diff --git a/Core/Util/PPGeDraw.cpp b/Core/Util/PPGeDraw.cpp index d18fda45f1..980a7e014e 100644 --- a/Core/Util/PPGeDraw.cpp +++ b/Core/Util/PPGeDraw.cpp @@ -229,15 +229,15 @@ void PPGeEnd() WriteCmd(GE_CMD_END, 0); if (dataWritePtr > dataPtr) { + sceGeBreak(0); sceGeSaveContext(savedContextPtr); gpu->EnableInterrupts(false); // We actually drew something - u32 list = sceGeListEnQueue(dlPtr, dlWritePtr, 0, 0); + u32 list = sceGeListEnQueueHead(dlPtr, dlWritePtr, -1, 0); DEBUG_LOG(HLE, "PPGe enqueued display list %i", list); - // TODO: Might need to call some internal trickery function when this is actually synchronous. - // sceGeListSync(u32 displayListID, 1); //0 : wait for completion 1:check and return gpu->EnableInterrupts(true); + sceGeContinue(); sceGeRestoreContext(savedContextPtr); } }