diff options
| author | iwubcode <iwubcode@users.noreply.github.com> | 2017-06-25 22:23:47 -0500 |
|---|---|---|
| committer | iwubcode <iwubcode@users.noreply.github.com> | 2017-11-17 22:11:28 -0600 |
| commit | 65cd085f9bb80531f5739807afffe837c7d2ffc1 (patch) | |
| tree | 1c75f48d5435f66a75f59d8d029ed2c5b5bbe4e1 /Source/Core/VideoCommon | |
| parent | 198d3b69b43b19685b4d4bed0173ebf2b2db9f0a (diff) | |
Add new GUI option to skip XFBToRam and remove old XFB options
Diffstat (limited to 'Source/Core/VideoCommon')
| -rw-r--r-- | Source/Core/VideoCommon/FramebufferManagerBase.cpp | 9 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/MainBase.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/RenderBase.cpp | 5 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.cpp | 2 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/VideoConfig.cpp | 10 | ||||
| -rw-r--r-- | Source/Core/VideoCommon/VideoConfig.h | 5 |
6 files changed, 7 insertions, 26 deletions
diff --git a/Source/Core/VideoCommon/FramebufferManagerBase.cpp b/Source/Core/VideoCommon/FramebufferManagerBase.cpp index 4bcb5e6567..d749cb7bcf 100644 --- a/Source/Core/VideoCommon/FramebufferManagerBase.cpp +++ b/Source/Core/VideoCommon/FramebufferManagerBase.cpp @@ -40,15 +40,6 @@ FramebufferManagerBase::~FramebufferManagerBase() void FramebufferManagerBase::CopyToXFB(u32 xfbAddr, u32 fbStride, u32 fbHeight, const EFBRectangle& sourceRc, float Gamma) { - if (g_ActiveConfig.bUseRealXFB) - { - if (g_framebuffer_manager) - g_framebuffer_manager->CopyToRealXFB(xfbAddr, fbStride, fbHeight, sourceRc, Gamma); - } - else - { - CopyToVirtualXFB(xfbAddr, fbStride, fbHeight, sourceRc, Gamma); - } } void FramebufferManagerBase::CopyToVirtualXFB(u32 xfbAddr, u32 fbStride, u32 fbHeight, diff --git a/Source/Core/VideoCommon/MainBase.cpp b/Source/Core/VideoCommon/MainBase.cpp index d442e7f0b8..652eb15969 100644 --- a/Source/Core/VideoCommon/MainBase.cpp +++ b/Source/Core/VideoCommon/MainBase.cpp @@ -49,7 +49,7 @@ void VideoBackendBase::Video_ExitLoop() void VideoBackendBase::Video_BeginField(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, u64 ticks) { - if (m_initialized && g_ActiveConfig.bUseXFB && g_renderer) + if (m_initialized && g_renderer) { Fifo::SyncGPU(Fifo::SyncGPUReason::Swap); diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 95217f443b..28e607f8cb 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -327,6 +327,7 @@ void Renderer::DrawDebugText() } const char* const efbcopy_text = g_ActiveConfig.bSkipEFBCopyToRam ? "to Texture" : "to RAM"; + const char* const xfbcopy_text = g_ActiveConfig.bSkipXFBCopyToRam ? "to Texture" : "to RAM"; // The rows const std::string lines[] = { @@ -338,6 +339,7 @@ void Renderer::DrawDebugText() "Speed Limit: Unlimited" : StringFromFormat("Speed Limit: %li%%", std::lround(SConfig::GetInstance().m_EmulationSpeed * 100.f)), + std::string("Copy XFB: ") + xfbcopy_text, }; enum @@ -688,8 +690,7 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbStride, u32 fbHeight, const // New frame stats.ResetFrame(); - Core::Callback_VideoCopiedToXFB(m_xfb_written || - (g_ActiveConfig.bUseXFB && g_ActiveConfig.bUseRealXFB)); + Core::Callback_VideoCopiedToXFB(m_xfb_written || !g_ActiveConfig.bSkipXFBCopyToRam); m_xfb_written = false; } diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 918e33bd64..7e71e5a38a 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -1416,7 +1416,7 @@ void TextureCacheBase::CopyRenderTargetToTexture(u32 dstAddr, EFBCopyFormat dstF ColorMask[3] = 0.0f; fConstAdd[3] = 1.0f; cbufid = 30; // just re-use the RGBX8 cbufid from above - copy_to_ram = g_ActiveConfig.bUseRealXFB; + copy_to_ram = !g_ActiveConfig.bSkipXFBCopyToRam; is_xfb_copy = true; break; diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index 8288ae8a1f..a127e23b18 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -67,8 +67,6 @@ void VideoConfig::Refresh() else iAspectRatio = aspect_ratio; bCrop = Config::Get(Config::GFX_CROP); - bUseXFB = Config::Get(Config::GFX_USE_XFB); - bUseRealXFB = Config::Get(Config::GFX_USE_REAL_XFB); iSafeTextureCache_ColorSamples = Config::Get(Config::GFX_SAFE_TEXTURE_CACHE_COLOR_SAMPLES); bShowFPS = Config::Get(Config::GFX_SHOW_FPS); bShowNetPlayPing = Config::Get(Config::GFX_SHOW_NETPLAY_PING); @@ -138,6 +136,7 @@ void VideoConfig::Refresh() Config::Get(Config::GFX_HACK_BBOX_PREFER_STENCIL_IMPLEMENTATION); bForceProgressive = Config::Get(Config::GFX_HACK_FORCE_PROGRESSIVE); bSkipEFBCopyToRam = Config::Get(Config::GFX_HACK_SKIP_EFB_COPY_TO_RAM); + bSkipXFBCopyToRam = Config::Get(Config::GFX_HACK_SKIP_XFB_COPY_TO_RAM); bCopyEFBScaled = Config::Get(Config::GFX_HACK_COPY_EFB_ENABLED); bEFBEmulateFormatChanges = Config::Get(Config::GFX_HACK_EFB_EMULATE_FORMAT_CHANGES); bVertexRounding = Config::Get(Config::GFX_HACK_VERTEX_ROUDING); @@ -171,13 +170,6 @@ void VideoConfig::VerifyValidity() 10000); iStereoMode = 0; } - - if (bUseXFB && bUseRealXFB) - { - OSD::AddMessage("Stereoscopic 3D isn't supported with Real XFB, turning off stereoscopy.", - 10000); - iStereoMode = 0; - } } } diff --git a/Source/Core/VideoCommon/VideoConfig.h b/Source/Core/VideoCommon/VideoConfig.h index 4e0dc71b79..71031eb192 100644 --- a/Source/Core/VideoCommon/VideoConfig.h +++ b/Source/Core/VideoCommon/VideoConfig.h @@ -65,8 +65,6 @@ struct VideoConfig final bool bWidescreenHack; int iAspectRatio; bool bCrop; // Aspect ratio controls. - bool bUseXFB; - bool bUseRealXFB; bool bShaderCache; // Enhancements @@ -119,6 +117,7 @@ struct VideoConfig final bool bEFBEmulateFormatChanges; bool bSkipEFBCopyToRam; + bool bSkipXFBCopyToRam; bool bCopyEFBScaled; int iSafeTextureCache_ColorSamples; ProjectionHackConfig phack; @@ -229,8 +228,6 @@ struct VideoConfig final } backend_info; // Utility - bool RealXFBEnabled() const { return bUseXFB && bUseRealXFB; } - bool VirtualXFBEnabled() const { return bUseXFB && !bUseRealXFB; } bool MultisamplingEnabled() const { return iMultisamples > 1; } bool ExclusiveFullscreenEnabled() const { |
