From 23832987b535b514a164cda789f1f6b4e4165a7f Mon Sep 17 00:00:00 2001 From: Scott Mansell Date: Thu, 23 Oct 2014 18:15:29 +1300 Subject: [PATCH] Revert changes preloading of RGBA8 tiles. This path should probally be optimised, but it's out of the scope of this PR. --- Source/Core/VideoCommon/BPStructs.cpp | 9 ++++++--- 1 file 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; } } }