From 1f20e11d61c82ef8800cd783505d32bec388a5be Mon Sep 17 00:00:00 2001 From: "Unknown W. Brackets" Date: Tue, 8 Nov 2022 07:29:36 -0800 Subject: [PATCH] GPU: Avoid self memcpy(). --- GPU/GPUCommon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPU/GPUCommon.cpp b/GPU/GPUCommon.cpp index ddaf02bab8..17de04fc52 100644 --- a/GPU/GPUCommon.cpp +++ b/GPU/GPUCommon.cpp @@ -3080,9 +3080,9 @@ bool GPUCommon::PerformMemoryCopy(u32 dest, u32 src, int size, GPUCopyFlag flags // Track stray copies of a framebuffer in RAM. MotoGP does this. if (framebufferManager_->MayIntersectFramebuffer(src) || framebufferManager_->MayIntersectFramebuffer(dest)) { if (!framebufferManager_->NotifyFramebufferCopy(src, dest, size, flags, gstate_c.skipDrawReason)) { - // We use a little hack for PerformReadbackToMemory/PerformWriteColorFromMemory using a VRAM mirror. + // We use matching values in PerformReadbackToMemory/PerformWriteColorFromMemory. // Since they're identical we don't need to copy. - if (!Memory::IsVRAMAddress(dest) || (dest ^ 0x00400000) != src) { + if (dest != src) { if (MemBlockInfoDetailed(size)) { const std::string tag = GetMemWriteTagAt("GPUMemcpy/", src, size); Memory::Memcpy(dest, src, size, tag.c_str(), tag.size());