From abc396cbe1e80fce48edad5633db7241ceb80455 Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Sat, 10 Aug 2013 15:16:49 -0700 Subject: [PATCH] Sync the GPU thread on list/draw sync. Otherwise, the CPU gets ahead (inside the frame) and games get confused. I don't think there's any good workaround to avoid this. --- GPU/GPUCommon.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index e831bf380..1ab389910 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -48,6 +48,9 @@ void GPUCommon::PopDLQueue() { } u32 GPUCommon::DrawSync(int mode) { + // Sync first, because the CPU is usually faster than the emulated GPU. + SyncThread(); + easy_guard guard(listLock); if (mode < 0 || mode > 1) return SCE_KERNEL_ERROR_INVALID_MODE; @@ -92,6 +95,9 @@ void GPUCommon::CheckDrawSync() { } int GPUCommon::ListSync(int listid, int mode) { + // Sync first, because the CPU is usually faster than the emulated GPU. + SyncThread(); + easy_guard guard(listLock); if (listid < 0 || listid >= DisplayListMaxCount) return SCE_KERNEL_ERROR_INVALID_ID;