summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/Software/SWmain.cpp
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2014-03-03 19:05:35 +0100
committerPierre Bourdon <delroth@gmail.com>2014-03-03 19:05:35 +0100
commit6fa39c28fe9f8d9b907bfd3c90b8882db4e223bc (patch)
treec03c0bee28374bdfa290e20768aaf817651dd8b6 /Source/Core/VideoBackends/Software/SWmain.cpp
parent91676ad93079dae4ec0735870e1b05ce8bc76583 (diff)
parent1bdf232feddff5ac05a47c99aa1dc02c1406ffc6 (diff)
Merge pull request #118 from neobrain/videosoftware-bypass-xfb-hack
Software renderer: Restore FifoPlayer support by emulating hardware backend behavior.
Diffstat (limited to 'Source/Core/VideoBackends/Software/SWmain.cpp')
-rw-r--r--Source/Core/VideoBackends/Software/SWmain.cpp29
1 files changed, 18 insertions, 11 deletions
diff --git a/Source/Core/VideoBackends/Software/SWmain.cpp b/Source/Core/VideoBackends/Software/SWmain.cpp
index b4a4cb2a2a..93aff80323 100644
--- a/Source/Core/VideoBackends/Software/SWmain.cpp
+++ b/Source/Core/VideoBackends/Software/SWmain.cpp
@@ -213,29 +213,36 @@ void VideoSoftware::Video_EndField()
// BeginField and EndFeild, We could possibly get away with copying out the whole thing
// at BeginField for less lag, but for the safest emulation we run it here.
- if (g_bSkipCurrentFrame || s_beginFieldArgs.xfbAddr == 0 ) {
+ if (g_bSkipCurrentFrame || s_beginFieldArgs.xfbAddr == 0)
+ {
swstats.frameCount++;
swstats.ResetFrame();
Core::Callback_VideoCopiedToXFB(false);
return;
}
- if (!g_SWVideoConfig.bHwRasterizer) {
- if(!g_SWVideoConfig.bBypassXFB) {
+ if (!g_SWVideoConfig.bHwRasterizer)
+ {
+ if(!g_SWVideoConfig.bBypassXFB)
+ {
EfbInterface::yuv422_packed *xfb = (EfbInterface::yuv422_packed *) Memory::GetPointer(s_beginFieldArgs.xfbAddr);
SWRenderer::UpdateColorTexture(xfb, s_beginFieldArgs.fbWidth, s_beginFieldArgs.fbHeight);
}
}
- // Idealy we would just move all the opengl contex stuff to the CPU thread, but this gets
- // messy when the Hardware Rasterizer is enabled.
- // And Neobrain loves his Hardware Rasterizer
+ // Ideally we would just move all the OpenGL context stuff to the CPU thread,
+ // but this gets messy when the hardware rasterizer is enabled.
+ // And neobrain loves his hardware rasterizer.
- // If we are runing dual core, Signal the GPU thread about the new colour texture.
- if (SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread)
- Common::AtomicStoreRelease(s_swapRequested, true);
- else
- SWRenderer::Swap(s_beginFieldArgs.fbWidth, s_beginFieldArgs.fbHeight);
+ // If BypassXFB has already done a swap (cf. EfbCopy::CopyToXfb), skip this.
+ if (!g_SWVideoConfig.bBypassXFB)
+ {
+ // If we are in dual core mode, notify the GPU thread about the new color texture.
+ if (SConfig::GetInstance().m_LocalCoreStartupParameter.bCPUThread)
+ Common::AtomicStoreRelease(s_swapRequested, true);
+ else
+ SWRenderer::Swap(s_beginFieldArgs.fbWidth, s_beginFieldArgs.fbHeight);
+ }
}
u32 VideoSoftware::Video_AccessEFB(EFBAccessType type, u32 x, u32 y, u32 InputData)