pcsx2: call GSReadFIFO from GS thread (was EE)

This commit is contained in:
Gregory Hainaut 2014-03-23 15:29:41 +01:00
parent 39a9b7b721
commit f78c39cc98
4 changed files with 12 additions and 2 deletions

View File

@ -50,8 +50,8 @@ void __fastcall ReadFIFO_VIF1(mem128_t* out)
DevCon.Warning("Warning! GS Download size < FIFO count!");
}
if (vif1Regs.stat.FQC > 0) {
GetMTGS().SendPointerPacket(GS_RINGTYPE_READ_FIFO1, 0, out);
GetMTGS().WaitGS();
GSreadFIFO((u64*)out);
vif1.GSLastDownloadSize--;
GUNIT_LOG("ReadFIFO_VIF1");
if (vif1.GSLastDownloadSize <= 16)

View File

@ -247,6 +247,8 @@ enum MTGS_RingCommand
, GS_RINGTYPE_CRC
, GS_RINGTYPE_GSPACKET
, GS_RINGTYPE_MTVU_GSPACKET
, GS_RINGTYPE_READ_FIFO1
, GS_RINGTYPE_READ_FIFO2
};

View File

@ -495,6 +495,14 @@ void SysMtgsThread::ExecuteTaskInThread()
GSsetGameCRC( tag.data[0], 0 );
break;
case GS_RINGTYPE_READ_FIFO1:
GSreadFIFO( (u64*)tag.data[1]);
break;
case GS_RINGTYPE_READ_FIFO2:
GSreadFIFO2( (u64*)tag.data[1], tag.data[0]);
break;
#ifdef PCSX2_DEVBUILD
default:
Console.Error("GSThreadProc, bad packet (%x) at m_ReadPos: %x, m_WritePos: %x", tag.command, m_ReadPos, m_WritePos);

View File

@ -67,8 +67,8 @@ void vif1TransferToMemory()
pxAssert(p3.isDone() || !p3.gifTag.isValid);
}
GetMTGS().SendPointerPacket(GS_RINGTYPE_READ_FIFO2, size, pMem);
GetMTGS().WaitGS();
GSreadFIFO2((u64*)pMem, size);
pMem += size;
if(pMem < pMemEnd) {