From 93fb0e1e1cb73b12189c96db52c53f19696ab1da Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 11 Feb 2018 15:36:49 +1000 Subject: TextureCache: Add an option to disable EFB copies to VRAM The option is named DisableCopyToVRAM under the Hacks section in GFX.ini. It is intentionally not exposed to the GUI, as users should not need to use it under normal circumstances. The main use is debugging issues in the EFB-to-RAM shaders. --- Source/Core/VideoCommon/TextureCacheBase.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'Source/Core/VideoCommon/TextureCacheBase.cpp') diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index b1925886e9..191d0a2009 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -1557,16 +1557,12 @@ void TextureCacheBase::CopyRenderTargetToTexture(u32 dstAddr, EFBCopyFormat dstF // // Disadvantage of all methods: Calling this function requires the GPU to perform a pipeline flush // which stalls any further CPU processing. - // - // For historical reasons, Dolphin doesn't actually implement "pure" EFB to RAM emulation, but - // only EFB to texture and hybrid EFB copies. - - bool is_xfb_copy = !is_depth_copy && !isIntensity && dstFormat == EFBCopyFormat::XFB; - - bool copy_to_vram = g_ActiveConfig.backend_info.bSupportsCopyToVram; + const bool is_xfb_copy = !is_depth_copy && !isIntensity && dstFormat == EFBCopyFormat::XFB; + bool copy_to_vram = + g_ActiveConfig.backend_info.bSupportsCopyToVram && !g_ActiveConfig.bDisableCopyToVRAM; bool copy_to_ram = !(is_xfb_copy ? g_ActiveConfig.bSkipXFBCopyToRam : g_ActiveConfig.bSkipEFBCopyToRam) || - !g_ActiveConfig.backend_info.bSupportsCopyToVram; + !copy_to_vram; u8* dst = Memory::GetPointer(dstAddr); if (dst == nullptr) -- cgit v1.2.3