From ca633a5a3c156491d75e715c3c9481a36bbe2bae Mon Sep 17 00:00:00 2001 From: Subv Date: Mon, 2 Jul 2018 09:46:33 -0500 Subject: GPU: Directly copy the pixels when performing a same-layout DMA. --- src/video_core/engines/maxwell_dma.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/video_core') diff --git a/src/video_core/engines/maxwell_dma.cpp b/src/video_core/engines/maxwell_dma.cpp index 442138988..c298f0bfb 100644 --- a/src/video_core/engines/maxwell_dma.cpp +++ b/src/video_core/engines/maxwell_dma.cpp @@ -49,7 +49,11 @@ void MaxwellDMA::HandleCopy() { ASSERT(regs.src_params.pos_y == 0); ASSERT(regs.dst_params.pos_x == 0); ASSERT(regs.dst_params.pos_y == 0); - ASSERT(regs.exec.is_dst_linear != regs.exec.is_src_linear); + + if (regs.exec.is_dst_linear == regs.exec.is_src_linear) { + Memory::CopyBlock(dest_cpu, source_cpu, regs.x_count * regs.y_count); + return; + } u8* src_buffer = Memory::GetPointer(source_cpu); u8* dst_buffer = Memory::GetPointer(dest_cpu); -- cgit v1.2.3