From e68ddf671c7630802cd9d6f3955e2cca8268a0f9 Mon Sep 17 00:00:00 2001 From: raven02 Date: Thu, 15 Aug 2013 03:44:20 +0800 Subject: [PATCH] Temporary fix issue #3167 in non-multithread mode #2 --- GPU/GPUCommon.cpp | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index d013a08256..79ee8c9885 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -48,9 +48,12 @@ void GPUCommon::PopDLQueue() { u32 GPUCommon::DrawSync(int mode) { // FIXME: Workaround for displaylists sometimes hanging unprocessed. Not yet sure of the cause. - ScheduleEvent(GPU_EVENT_PROCESS_QUEUE); - // Sync first, because the CPU is usually faster than the emulated GPU. - SyncThread(); + if (g_Config.bSeparateCPUThread) { + // FIXME: Workaround for displaylists sometimes hanging unprocessed. Not yet sure of the cause. + ScheduleEvent(GPU_EVENT_PROCESS_QUEUE); + // Sync first, because the CPU is usually faster than the emulated GPU. + SyncThread(); + } easy_guard guard(listLock); if (mode < 0 || mode > 1) @@ -96,10 +99,12 @@ void GPUCommon::CheckDrawSync() { } int GPUCommon::ListSync(int listid, int mode) { - // FIXME: Workaround for displaylists sometimes hanging unprocessed. Not yet sure of the cause. - ScheduleEvent(GPU_EVENT_PROCESS_QUEUE); - // Sync first, because the CPU is usually faster than the emulated GPU. - SyncThread(); + if (g_Config.bSeparateCPUThread) { + // FIXME: Workaround for displaylists sometimes hanging unprocessed. Not yet sure of the cause. + ScheduleEvent(GPU_EVENT_PROCESS_QUEUE); + // Sync first, because the CPU is usually faster than the emulated GPU. + SyncThread(); + } easy_guard guard(listLock); if (listid < 0 || listid >= DisplayListMaxCount)