diff options
| author | JosJuice <josjuice@gmail.com> | 2021-04-18 10:43:26 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-18 10:43:26 +0200 |
| commit | 92308f5e34d190ef0381595cbab8eb76a3739cc6 (patch) | |
| tree | 4e2b74d972c25b131ba53a18d5ee73f7dd183e49 /Source/Core | |
| parent | e7f68cf850c17673bf413641f7107426fb74a6ea (diff) | |
| parent | cc32fa91af5431951f8f155d184d0d719b1961ac (diff) | |
Merge pull request #9645 from leoetlino/fifoplayer-optimization
FifoPlayer: Copy data with memcpy instead of one byte at a time
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/FifoPlayer/FifoPlayer.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/Core/Core/FifoPlayer/FifoPlayer.cpp b/Source/Core/Core/FifoPlayer/FifoPlayer.cpp index 49a89749dd..880ef791a5 100644 --- a/Source/Core/Core/FifoPlayer/FifoPlayer.cpp +++ b/Source/Core/Core/FifoPlayer/FifoPlayer.cpp @@ -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++]); |
