mirror of https://github.com/PCSX2/pcsx2.git
pcsx2: try to ensure better sync with FIFO read call
First wait will ensure correctness of GS register. 2nd wait will ensure that the GS fifo read call is finished (If I understand MTGS correctly)
This commit is contained in:
parent
14efa6fbda
commit
c6d8b52d26
|
@ -50,8 +50,9 @@ void __fastcall ReadFIFO_VIF1(mem128_t* out)
|
||||||
DevCon.Warning("Warning! GS Download size < FIFO count!");
|
DevCon.Warning("Warning! GS Download size < FIFO count!");
|
||||||
}
|
}
|
||||||
if (vif1Regs.stat.FQC > 0) {
|
if (vif1Regs.stat.FQC > 0) {
|
||||||
GetMTGS().SendPointerPacket(GS_RINGTYPE_READ_FIFO1, 0, out);
|
|
||||||
GetMTGS().WaitGS();
|
GetMTGS().WaitGS();
|
||||||
|
GetMTGS().SendPointerPacket(GS_RINGTYPE_READ_FIFO1, 0, out);
|
||||||
|
GetMTGS().WaitGS(false); // wait without reg sync
|
||||||
vif1.GSLastDownloadSize--;
|
vif1.GSLastDownloadSize--;
|
||||||
GUNIT_LOG("ReadFIFO_VIF1");
|
GUNIT_LOG("ReadFIFO_VIF1");
|
||||||
if (vif1.GSLastDownloadSize <= 16)
|
if (vif1.GSLastDownloadSize <= 16)
|
||||||
|
|
|
@ -496,10 +496,12 @@ void SysMtgsThread::ExecuteTaskInThread()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GS_RINGTYPE_READ_FIFO1:
|
case GS_RINGTYPE_READ_FIFO1:
|
||||||
|
MTGS_LOG( "(MTGS Packet Read) ringtype=Fifo1" );
|
||||||
GSreadFIFO( (u64*)tag.data[1]);
|
GSreadFIFO( (u64*)tag.data[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case GS_RINGTYPE_READ_FIFO2:
|
case GS_RINGTYPE_READ_FIFO2:
|
||||||
|
MTGS_LOG( "(MTGS Packet Read) ringtype=Fifo2, size=%d", tag.data[0] );
|
||||||
GSreadFIFO2( (u64*)tag.data[1], tag.data[0]);
|
GSreadFIFO2( (u64*)tag.data[1], tag.data[0]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
@ -67,8 +67,9 @@ void vif1TransferToMemory()
|
||||||
pxAssert(p3.isDone() || !p3.gifTag.isValid);
|
pxAssert(p3.isDone() || !p3.gifTag.isValid);
|
||||||
}
|
}
|
||||||
|
|
||||||
GetMTGS().SendPointerPacket(GS_RINGTYPE_READ_FIFO2, size, pMem);
|
|
||||||
GetMTGS().WaitGS();
|
GetMTGS().WaitGS();
|
||||||
|
GetMTGS().SendPointerPacket(GS_RINGTYPE_READ_FIFO2, size, pMem);
|
||||||
|
GetMTGS().WaitGS(false); // wait without reg sync
|
||||||
pMem += size;
|
pMem += size;
|
||||||
|
|
||||||
if(pMem < pMemEnd) {
|
if(pMem < pMemEnd) {
|
||||||
|
|
Loading…
Reference in New Issue