diff options
| author | Scott Mansell <phiren@gmail.com> | 2014-10-23 18:15:29 +1300 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2014-10-23 18:15:29 +1300 |
| commit | 23832987b535b514a164cda789f1f6b4e4165a7f (patch) | |
| tree | 458ba33e90e8747aace8990ce337057ccebf804a /Source/Core/VideoCommon/BPStructs.cpp | |
| parent | 3aa979d7d7f14c27d75b2cd3b4feb664e6f88c38 (diff) | |
Revert changes preloading of RGBA8 tiles.
This path should probally be optimised, but it's out of the
scope of this PR.
Diffstat (limited to 'Source/Core/VideoCommon/BPStructs.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/BPStructs.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/BPStructs.cpp b/Source/Core/VideoCommon/BPStructs.cpp index f7778282ba..cd3302beb3 100644 --- a/Source/Core/VideoCommon/BPStructs.cpp +++ b/Source/Core/VideoCommon/BPStructs.cpp @@ -466,6 +466,8 @@ static void BPWritten(const BPCmd& bp) } else // RGBA8 tiles (and CI14, but that might just be stupid libogc!) { + u8* src_ptr = Memory::GetPointer(src_addr); + // AR and GB tiles are stored in separate TMEM banks => can't use a single memcpy for everything u32 tmem_addr_odd = tmem_cfg.preload_tmem_odd * TMEM_LINE_SIZE; @@ -475,11 +477,12 @@ static void BPWritten(const BPCmd& bp) tmem_addr_odd + TMEM_LINE_SIZE > TMEM_SIZE) return; - Memory::CopyFromEmu(texMem + tmem_addr_even, src_addr, TMEM_LINE_SIZE); - Memory::CopyFromEmu(texMem + tmem_addr_odd, src_addr + TMEM_LINE_SIZE, TMEM_LINE_SIZE); + // TODO: This isn't very optimised, does a whole lot of small memcpys + memcpy(texMem + tmem_addr_even, src_ptr, TMEM_LINE_SIZE); + memcpy(texMem + tmem_addr_odd, src_ptr + TMEM_LINE_SIZE, TMEM_LINE_SIZE); tmem_addr_even += TMEM_LINE_SIZE; tmem_addr_odd += TMEM_LINE_SIZE; - src_addr += TMEM_LINE_SIZE * 2; + src_ptr += TMEM_LINE_SIZE * 2; } } } |
