Merge pull request #9645 from leoetlino/fifoplayer-optimization

FifoPlayer: Copy data with memcpy instead of one byte at a time
This commit is contained in:
JosJuice 2021-04-18 10:43:26 +02:00 committed by GitHub
commit 92308f5e34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -381,8 +381,9 @@ void FifoPlayer::WriteFifo(const u8* data, u32 start, u32 end)
u32 burstEnd = std::min(written + 255, lastBurstEnd);
while (written < burstEnd)
GPFifo::FastWrite8(data[written++]);
std::copy(data + written, data + burstEnd, PowerPC::ppcState.gather_pipe_ptr);
PowerPC::ppcState.gather_pipe_ptr += burstEnd - written;
written = burstEnd;
GPFifo::Write8(data[written++]);