From 1313d3461f752cd92af594f04155bc78a66f4ebd Mon Sep 17 00:00:00 2001 From: degasus Date: Sat, 21 Feb 2015 11:45:48 +0100 Subject: VideoCommon: always enable efb copy --- Source/Core/VideoCommon/BPFunctions.cpp | 7 ++----- Source/Core/VideoCommon/RenderBase.cpp | 3 +-- Source/Core/VideoCommon/VideoConfig.cpp | 3 --- Source/Core/VideoCommon/VideoConfig.h | 5 ++--- 4 files changed, 5 insertions(+), 13 deletions(-) (limited to 'Source/Core/VideoCommon') diff --git a/Source/Core/VideoCommon/BPFunctions.cpp b/Source/Core/VideoCommon/BPFunctions.cpp index 604840efdd..748f1c269e 100644 --- a/Source/Core/VideoCommon/BPFunctions.cpp +++ b/Source/Core/VideoCommon/BPFunctions.cpp @@ -90,11 +90,8 @@ void CopyEFB(u32 dstAddr, const EFBRectangle& srcRect, bool isIntensity, bool scaleByHalf) { // bpmem.zcontrol.pixel_format to PEControl::Z24 is when the game wants to copy from ZBuffer (Zbuffer uses 24-bit Format) - if (g_ActiveConfig.bEFBCopyEnable) - { - TextureCache::CopyRenderTargetToTexture(dstAddr, dstFormat, srcFormat, - srcRect, isIntensity, scaleByHalf); - } + TextureCache::CopyRenderTargetToTexture(dstAddr, dstFormat, srcFormat, + srcRect, isIntensity, scaleByHalf); } /* Explanation of the magic behind ClearScreen: diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index ccceb954dd..8656ba621c 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -375,8 +375,7 @@ void Renderer::DrawDebugText() break; } - const char* const efbcopy_text = g_ActiveConfig.bEFBCopyEnable ? - (g_ActiveConfig.bCopyEFBToTexture ? "to Texture" : "to RAM") : "Disabled"; + const char* const efbcopy_text = g_ActiveConfig.bCopyEFBToTexture ? "to Texture" : "to RAM"; // The rows const std::string lines[] = diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index ef5fe26798..e0b91c198c 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -97,7 +97,6 @@ void VideoConfig::Load(const std::string& ini_file) IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks"); hacks->Get("EFBAccessEnable", &bEFBAccessEnable, true); - hacks->Get("EFBCopyEnable", &bEFBCopyEnable, true); hacks->Get("EFBToTextureEnable", &bCopyEFBToTexture, true); hacks->Get("EFBScaledCopy", &bCopyEFBScaled, true); hacks->Get("EFBEmulateFormatChanges", &bEFBEmulateFormatChanges, false); @@ -197,7 +196,6 @@ void VideoConfig::GameIniLoad() CHECK_SETTING("Video_Stereoscopy", "StereoConvergenceMinimum", iStereoConvergenceMinimum); CHECK_SETTING("Video_Hacks", "EFBAccessEnable", bEFBAccessEnable); - CHECK_SETTING("Video_Hacks", "EFBCopyEnable", bEFBCopyEnable); CHECK_SETTING("Video_Hacks", "EFBToTextureEnable", bCopyEFBToTexture); CHECK_SETTING("Video_Hacks", "EFBScaledCopy", bCopyEFBScaled); CHECK_SETTING("Video_Hacks", "EFBEmulateFormatChanges", bEFBEmulateFormatChanges); @@ -285,7 +283,6 @@ void VideoConfig::Save(const std::string& ini_file) IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks"); hacks->Set("EFBAccessEnable", bEFBAccessEnable); - hacks->Set("EFBCopyEnable", bEFBCopyEnable); hacks->Set("EFBToTextureEnable", bCopyEFBToTexture); hacks->Set("EFBScaledCopy", bCopyEFBScaled); hacks->Set("EFBEmulateFormatChanges", bEFBEmulateFormatChanges); diff --git a/Source/Core/VideoCommon/VideoConfig.h b/Source/Core/VideoCommon/VideoConfig.h index 760a068c0f..0386e9e312 100644 --- a/Source/Core/VideoCommon/VideoConfig.h +++ b/Source/Core/VideoCommon/VideoConfig.h @@ -113,7 +113,6 @@ struct VideoConfig final bool bEFBAccessEnable; bool bPerfQueriesEnable; - bool bEFBCopyEnable; bool bEFBEmulateFormatChanges; bool bCopyEFBToTexture; bool bCopyEFBScaled; @@ -165,8 +164,8 @@ struct VideoConfig final // Utility bool RealXFBEnabled() const { return bUseXFB && bUseRealXFB; } bool VirtualXFBEnabled() const { return bUseXFB && !bUseRealXFB; } - bool EFBCopiesToTextureEnabled() const { return bEFBCopyEnable && bCopyEFBToTexture; } - bool EFBCopiesToRamEnabled() const { return bEFBCopyEnable && !bCopyEFBToTexture; } + bool EFBCopiesToTextureEnabled() const { return bCopyEFBToTexture; } + bool EFBCopiesToRamEnabled() const { return !bCopyEFBToTexture; } bool ExclusiveFullscreenEnabled() const { return backend_info.bSupportsExclusiveFullscreen && !bBorderlessFullscreen; } }; -- cgit v1.2.3 From 967eaad8df52197dad69891c25cbc69f8e52e6b8 Mon Sep 17 00:00:00 2001 From: degasus Date: Sat, 21 Feb 2015 12:08:47 +0100 Subject: VideoCommon: rename efb2tex and efb2ram --- Source/Core/VideoCommon/RenderBase.cpp | 2 +- Source/Core/VideoCommon/TextureCacheBase.cpp | 2 +- Source/Core/VideoCommon/VideoConfig.cpp | 6 +++--- Source/Core/VideoCommon/VideoConfig.h | 4 +--- 4 files changed, 6 insertions(+), 8 deletions(-) (limited to 'Source/Core/VideoCommon') diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 8656ba621c..c226a74700 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -375,7 +375,7 @@ void Renderer::DrawDebugText() break; } - const char* const efbcopy_text = g_ActiveConfig.bCopyEFBToTexture ? "to Texture" : "to RAM"; + const char* const efbcopy_text = g_ActiveConfig.bSkipEFBCopyToRam ? "to Texture" : "to RAM"; // The rows const std::string lines[] = diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp index 7bd5a6b570..8b6e819fed 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.cpp +++ b/Source/Core/VideoCommon/TextureCacheBase.cpp @@ -356,7 +356,7 @@ TextureCache::TCacheEntryBase* TextureCache::Load(const u32 stage) // EFB copies have slightly different rules: the hash doesn't need to match // in EFB2Tex mode, and EFB copy formats have different meanings from texture // formats. - if (g_ActiveConfig.bCopyEFBToTexture || + if (g_ActiveConfig.bSkipEFBCopyToRam || (tex_hash == entry->hash && (!isPaletteTexture || g_Config.backend_info.bSupportsPaletteConversion))) { // TODO: We should check format/width/height/levels for EFB copies. Checking diff --git a/Source/Core/VideoCommon/VideoConfig.cpp b/Source/Core/VideoCommon/VideoConfig.cpp index e0b91c198c..4d56582364 100644 --- a/Source/Core/VideoCommon/VideoConfig.cpp +++ b/Source/Core/VideoCommon/VideoConfig.cpp @@ -97,7 +97,7 @@ void VideoConfig::Load(const std::string& ini_file) IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks"); hacks->Get("EFBAccessEnable", &bEFBAccessEnable, true); - hacks->Get("EFBToTextureEnable", &bCopyEFBToTexture, true); + hacks->Get("EFBToTextureEnable", &bSkipEFBCopyToRam, true); hacks->Get("EFBScaledCopy", &bCopyEFBScaled, true); hacks->Get("EFBEmulateFormatChanges", &bEFBEmulateFormatChanges, false); @@ -196,7 +196,7 @@ void VideoConfig::GameIniLoad() CHECK_SETTING("Video_Stereoscopy", "StereoConvergenceMinimum", iStereoConvergenceMinimum); CHECK_SETTING("Video_Hacks", "EFBAccessEnable", bEFBAccessEnable); - CHECK_SETTING("Video_Hacks", "EFBToTextureEnable", bCopyEFBToTexture); + CHECK_SETTING("Video_Hacks", "EFBToTextureEnable", bSkipEFBCopyToRam); CHECK_SETTING("Video_Hacks", "EFBScaledCopy", bCopyEFBScaled); CHECK_SETTING("Video_Hacks", "EFBEmulateFormatChanges", bEFBEmulateFormatChanges); @@ -283,7 +283,7 @@ void VideoConfig::Save(const std::string& ini_file) IniFile::Section* hacks = iniFile.GetOrCreateSection("Hacks"); hacks->Set("EFBAccessEnable", bEFBAccessEnable); - hacks->Set("EFBToTextureEnable", bCopyEFBToTexture); + hacks->Set("EFBToTextureEnable", bSkipEFBCopyToRam); hacks->Set("EFBScaledCopy", bCopyEFBScaled); hacks->Set("EFBEmulateFormatChanges", bEFBEmulateFormatChanges); diff --git a/Source/Core/VideoCommon/VideoConfig.h b/Source/Core/VideoCommon/VideoConfig.h index 0386e9e312..2eaa0d7e75 100644 --- a/Source/Core/VideoCommon/VideoConfig.h +++ b/Source/Core/VideoCommon/VideoConfig.h @@ -114,7 +114,7 @@ struct VideoConfig final bool bPerfQueriesEnable; bool bEFBEmulateFormatChanges; - bool bCopyEFBToTexture; + bool bSkipEFBCopyToRam; bool bCopyEFBScaled; int iSafeTextureCache_ColorSamples; int iPhackvalue[3]; @@ -164,8 +164,6 @@ struct VideoConfig final // Utility bool RealXFBEnabled() const { return bUseXFB && bUseRealXFB; } bool VirtualXFBEnabled() const { return bUseXFB && !bUseRealXFB; } - bool EFBCopiesToTextureEnabled() const { return bCopyEFBToTexture; } - bool EFBCopiesToRamEnabled() const { return !bCopyEFBToTexture; } bool ExclusiveFullscreenEnabled() const { return backend_info.bSupportsExclusiveFullscreen && !bBorderlessFullscreen; } }; -- cgit v1.2.3