diff options
| author | Linktothepast <kostamarino@gmail.com> | 2015-09-28 16:50:35 +0300 |
|---|---|---|
| committer | Linktothepast <kostamarino@gmail.com> | 2015-09-28 16:50:35 +0300 |
| commit | 748be565b8df535ef558e74b38cd0f4d615f8a21 (patch) | |
| tree | b151efee0a87e99125f2401325a9bddecf84fc73 /Source/Core/VideoBackends/Software/EfbCopy.cpp | |
| parent | cf17fccdd3093a1b8476b10183b1c4bde36da74d (diff) | |
| parent | ce493b897d6d3735c930a8465cc0c26bbe5feb86 (diff) | |
Merge remote-tracking branch 'dolphin-emu/master' into gameinis
Diffstat (limited to 'Source/Core/VideoBackends/Software/EfbCopy.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/Software/EfbCopy.cpp | 68 |
1 files changed, 29 insertions, 39 deletions
diff --git a/Source/Core/VideoBackends/Software/EfbCopy.cpp b/Source/Core/VideoBackends/Software/EfbCopy.cpp index 688a5cddb9..39dff99ad0 100644 --- a/Source/Core/VideoBackends/Software/EfbCopy.cpp +++ b/Source/Core/VideoBackends/Software/EfbCopy.cpp @@ -2,14 +2,13 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. +#include "Common/GL/GLInterfaceBase.h" #include "Core/Core.h" #include "Core/HW/Memmap.h" -#include "VideoBackends/OGL/GLInterfaceBase.h" #include "VideoBackends/Software/BPMemLoader.h" #include "VideoBackends/Software/DebugUtil.h" #include "VideoBackends/Software/EfbCopy.h" #include "VideoBackends/Software/EfbInterface.h" -#include "VideoBackends/Software/HwRasterizer.h" #include "VideoBackends/Software/SWCommandProcessor.h" #include "VideoBackends/Software/SWRenderer.h" #include "VideoBackends/Software/SWStatistics.h" @@ -31,47 +30,41 @@ namespace EfbCopy { GLInterface->Update(); // update the render window position and the backbuffer size - if (!g_SWVideoConfig.bHwRasterizer) - { - INFO_LOG(VIDEO, "xfbaddr: %x, fbwidth: %i, fbheight: %i, source: (%i, %i, %i, %i), Gamma %f", - xfbAddr, fbWidth, fbHeight, sourceRc.top, sourceRc.left, sourceRc.bottom, sourceRc.right, Gamma); + INFO_LOG(VIDEO, "xfbaddr: %x, fbwidth: %i, fbheight: %i, source: (%i, %i, %i, %i), Gamma %f", + xfbAddr, fbWidth, fbHeight, sourceRc.top, sourceRc.left, sourceRc.bottom, sourceRc.right, Gamma); - if (!g_SWVideoConfig.bBypassXFB) - { - EfbInterface::yuv422_packed* xfb_in_ram = (EfbInterface::yuv422_packed *) Memory::GetPointer(xfbAddr); + if (!g_SWVideoConfig.bBypassXFB) + { + EfbInterface::yuv422_packed* xfb_in_ram = (EfbInterface::yuv422_packed *) Memory::GetPointer(xfbAddr); - EfbInterface::CopyToXFB(xfb_in_ram, fbWidth, fbHeight, sourceRc, Gamma); - } - else - { - // Ask SWRenderer for the next color texture - u8 *colorTexture = SWRenderer::GetNextColorTexture(); - - EfbInterface::BypassXFB(colorTexture, fbWidth, fbHeight, sourceRc, Gamma); - - // Tell SWRenderer we are now finished with it. - SWRenderer::SwapColorTexture(); - - // FifoPlayer is broken and never calls BeginFrame/EndFrame. - // Hence, we manually force a swap now. This emulates the behavior - // of hardware backends with XFB emulation disabled. - // TODO: Fix FifoPlayer by making proper use of VideoInterface! - // This requires careful synchronization since GPU commands - // are processed on a different thread than VI commands. - SWRenderer::Swap(fbWidth, fbHeight); - DebugUtil::OnFrameEnd(fbWidth, fbHeight); - } + EfbInterface::CopyToXFB(xfb_in_ram, fbWidth, fbHeight, sourceRc, Gamma); + } + else + { + // Ask SWRenderer for the next color texture + u8 *colorTexture = SWRenderer::GetNextColorTexture(); + + EfbInterface::BypassXFB(colorTexture, fbWidth, fbHeight, sourceRc, Gamma); + + // Tell SWRenderer we are now finished with it. + SWRenderer::SwapColorTexture(); + + // FifoPlayer is broken and never calls BeginFrame/EndFrame. + // Hence, we manually force a swap now. This emulates the behavior + // of hardware backends with XFB emulation disabled. + // TODO: Fix FifoPlayer by making proper use of VideoInterface! + // This requires careful synchronization since GPU commands + // are processed on a different thread than VI commands. + SWRenderer::Swap(fbWidth, fbHeight); + DebugUtil::OnFrameEnd(fbWidth, fbHeight); } } static void CopyToRam() { - if (!g_SWVideoConfig.bHwRasterizer) - { - u8 *dest_ptr = Memory::GetPointer(bpmem.copyTexDest << 5); + u8 *dest_ptr = Memory::GetPointer(bpmem.copyTexDest << 5); - TextureEncoder::Encode(dest_ptr); - } + TextureEncoder::Encode(dest_ptr); } static void ClearEfb() @@ -138,10 +131,7 @@ namespace EfbCopy if (bpmem.triggerEFBCopy.clear) { - if (g_SWVideoConfig.bHwRasterizer) - HwRasterizer::Clear(); - else - ClearEfb(); + ClearEfb(); } } } |
