From 40d87e0f8f351fb9bdb1ddd1ff9919f7ddbd7d1a Mon Sep 17 00:00:00 2001 From: ayuanx Date: Tue, 15 Jun 2010 11:20:05 +0000 Subject: [PATCH] Oops, the HiWatermark interrupt latency is too long for game to react. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5707 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/VideoCommon/Src/CommandProcessor.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Source/Core/VideoCommon/Src/CommandProcessor.cpp b/Source/Core/VideoCommon/Src/CommandProcessor.cpp index 1072ff1662..1d7d64504d 100644 --- a/Source/Core/VideoCommon/Src/CommandProcessor.cpp +++ b/Source/Core/VideoCommon/Src/CommandProcessor.cpp @@ -571,7 +571,8 @@ void STACKALIGN GatherPipeBursted() if (!m_CPCtrlReg.GPLinkEnable) return; - _assert_msg_(COMMANDPROCESSOR, fifo.CPReadWriteDistance < fifo.CPEnd - fifo.CPBase, "FIFO is overflown by GatherPipe !"); + _assert_msg_(COMMANDPROCESSOR, fifo.CPReadWriteDistance <= fifo.CPEnd - fifo.CPBase, + "FIFO is overflown by GatherPipe !\nCPU thread is too fast, lower the HiWatermark may help."); if (g_VideoInitialize.bOnThread) @@ -584,7 +585,8 @@ void STACKALIGN GatherPipeBursted() Common::AtomicAdd(fifo.CPReadWriteDistance, GATHER_PIPE_SIZE); - if (fifo.CPReadWriteDistance >= fifo.CPHiWatermark) + // The interrupt latency in Dolphin is much longer than Hardware, so we must be more vigilant on Watermark + if (fifo.CPReadWriteDistance >= fifo.CPHiWatermark - 32 * 20) { m_CPStatusReg.OverflowHiWatermark = true; if (m_CPCtrlReg.FifoOverflowIntEnable)