I've observed that "FIFO is overflown by GatherPipe" is not real overflow.

Really that happens because the fifo.CPReadWriteDistance is negative.
Example: CPReadWriteDistance: -864 CPEnd: 10092672 fifo.CPBase: 9568416
In SMG this is because  PI_FIFO_RESET is writing and after fifo.CPReadWriteDistance will be setted to 0.
To Prevent that, I've Implemented AbortFrame function in the CommmandProcessor. It should fix overflown because of that. 
Note: There is other issue (Issue 2846) where the fifo.CPReadWriteDistance is negative too but the effect is different.
I'm working to solve this.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6083 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Marcos Vitali
2010-08-10 07:25:35 +00:00
parent 2b45e87b3e
commit 3b7a6ce336
12 changed files with 59 additions and 2 deletions

View File

@ -701,4 +701,18 @@ void SetFifoIdleFromVideoPlugin()
s_fifoIdleEvent.Set();
}
// This is called by the ProcessorInterface when PI_FIFO_RESET is writed,
// the general idea is abort all commands in the FIFO.
// This prevent Negative fifo.CPReadWriteDistance because when PI_FIFO_RESET happens
// the fifo.CPReadWriteDistance is writed to 0
void AbortFrame()
{
Fifo_SetRendering(false);
while(!fifo.CPCmdIdle)
Common::YieldCPU();
Fifo_SetRendering(true);
PixelEngine::ResetSetToken();
PixelEngine::ResetSetFinish();
}
} // end of namespace CommandProcessor