From f0d5d21e64ba5ee3809aa8d517e1f140ca4f172b Mon Sep 17 00:00:00 2001 From: refractionpcsx2 Date: Sat, 11 Mar 2023 12:18:02 +0000 Subject: [PATCH] GS-Config: Remove remnants of the WrapMem setting. --- pcsx2/Config.h | 1 - pcsx2/Frontend/ImGuiOverlays.cpp | 2 -- pcsx2/GS/GS.cpp | 1 - pcsx2/GS/Renderers/HW/GSTextureCache.cpp | 41 +++++++++--------------- pcsx2/GameDatabase.cpp | 8 ----- pcsx2/GameDatabase.h | 1 - pcsx2/Pcsx2Config.cpp | 2 -- 7 files changed, 15 insertions(+), 41 deletions(-) diff --git a/pcsx2/Config.h b/pcsx2/Config.h index 8893e459c3..25981bf5dc 100644 --- a/pcsx2/Config.h +++ b/pcsx2/Config.h @@ -666,7 +666,6 @@ struct Pcsx2Config GPUPaletteConversion : 1, AutoFlushSW : 1, PreloadFrameWithGSData : 1, - WrapGSMem : 1, Mipmap : 1, ManualUserHacks : 1, UserHacks_AlignSpriteX : 1, diff --git a/pcsx2/Frontend/ImGuiOverlays.cpp b/pcsx2/Frontend/ImGuiOverlays.cpp index 745472d1f9..58763b379f 100644 --- a/pcsx2/Frontend/ImGuiOverlays.cpp +++ b/pcsx2/Frontend/ImGuiOverlays.cpp @@ -433,8 +433,6 @@ void ImGuiManager::DrawSettingsOverlay() APPEND("TPV "); if (GSConfig.UserHacks_DisableSafeFeatures) APPEND("DSF "); - if (GSConfig.WrapGSMem) - APPEND("WGSM "); if (GSConfig.PreloadFrameWithGSData) APPEND("PLFD "); if (GSConfig.UserHacks_EstimateTextureRegion) diff --git a/pcsx2/GS/GS.cpp b/pcsx2/GS/GS.cpp index cdf4ed4d9b..18cafbb3cf 100644 --- a/pcsx2/GS/GS.cpp +++ b/pcsx2/GS/GS.cpp @@ -756,7 +756,6 @@ void GSUpdateConfig(const Pcsx2Config::GSOptions& new_config) GSConfig.TriFilter != old_config.TriFilter || GSConfig.GPUPaletteConversion != old_config.GPUPaletteConversion || GSConfig.PreloadFrameWithGSData != old_config.PreloadFrameWithGSData || - GSConfig.WrapGSMem != old_config.WrapGSMem || GSConfig.UserHacks_CPUFBConversion != old_config.UserHacks_CPUFBConversion || GSConfig.UserHacks_DisableDepthSupport != old_config.UserHacks_DisableDepthSupport || GSConfig.UserHacks_DisablePartialInvalidation != old_config.UserHacks_DisablePartialInvalidation || diff --git a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp index 29c2e09658..043ba664c5 100644 --- a/pcsx2/GS/Renderers/HW/GSTextureCache.cpp +++ b/pcsx2/GS/Renderers/HW/GSTextureCache.cpp @@ -3369,23 +3369,18 @@ void GSTextureCache::Source::Update(const GSVector4i& rect, int level) for (int x = r.left; x < r.right; bn.nextBlockX(), x += bs.x) { const int i = (bn.blkY() << 7) + bn.blkX(); - const u32 block = bn.valueNoWrap(); + const u32 addr = i % MAX_BLOCKS; - if (block < MAX_BLOCKS || GSConfig.WrapGSMem) + const u32 row = addr >> 5u; + const u32 col = 1 << (addr & 31u); + + if ((m_valid[row] & col) == 0) { - const u32 addr = i % MAX_BLOCKS; + m_valid[row] |= col; - const u32 row = addr >> 5u; - const u32 col = 1 << (addr & 31u); + Write(GSVector4i(x, y, x + bs.x, y + bs.y), level); - if ((m_valid[row] & col) == 0) - { - m_valid[row] |= col; - - Write(GSVector4i(x, y, x + bs.x, y + bs.y), level); - - blocks++; - } + blocks++; } } } @@ -3396,23 +3391,17 @@ void GSTextureCache::Source::Update(const GSVector4i& rect, int level) { for (int x = r.left; x < r.right; x += bs.x, bn.nextBlockX()) { - u32 block = bn.valueNoWrap(); + const u32 block = bn.value(); + const u32 row = block >> 5u; + const u32 col = 1 << (block & 31u); - if (block < MAX_BLOCKS || GSConfig.WrapGSMem) + if ((m_valid[row] & col) == 0) { - block %= MAX_BLOCKS; + m_valid[row] |= col; - const u32 row = block >> 5u; - const u32 col = 1 << (block & 31u); + Write(GSVector4i(x, y, x + bs.x, y + bs.y), level); - if ((m_valid[row] & col) == 0) - { - m_valid[row] |= col; - - Write(GSVector4i(x, y, x + bs.x, y + bs.y), level); - - blocks++; - } + blocks++; } } } diff --git a/pcsx2/GameDatabase.cpp b/pcsx2/GameDatabase.cpp index 424ec66373..1d561eb40b 100644 --- a/pcsx2/GameDatabase.cpp +++ b/pcsx2/GameDatabase.cpp @@ -345,7 +345,6 @@ static const char* s_gs_hw_fix_names[] = { "cpuFramebufferConversion", "readTCOnClose", "disableDepthSupport", - "wrapGSMem", "preloadFrameData", "disablePartialInvalidation", "partialTargetInvalidation", @@ -568,9 +567,6 @@ bool GameDatabaseSchema::GameEntry::configMatchesHWFix(const Pcsx2Config::GSOpti case GSHWFixId::DisableDepthSupport: return (static_cast(config.UserHacks_DisableDepthSupport) == value); - case GSHWFixId::WrapGSMem: - return (static_cast(config.WrapGSMem) == value); - case GSHWFixId::PreloadFrameData: return (static_cast(config.PreloadFrameWithGSData) == value); @@ -700,10 +696,6 @@ u32 GameDatabaseSchema::GameEntry::applyGSHardwareFixes(Pcsx2Config::GSOptions& config.UserHacks_DisableDepthSupport = (value > 0); break; - case GSHWFixId::WrapGSMem: - config.WrapGSMem = (value > 0); - break; - case GSHWFixId::PreloadFrameData: config.PreloadFrameWithGSData = (value > 0); break; diff --git a/pcsx2/GameDatabase.h b/pcsx2/GameDatabase.h index 0e10971947..59874fe805 100644 --- a/pcsx2/GameDatabase.h +++ b/pcsx2/GameDatabase.h @@ -64,7 +64,6 @@ namespace GameDatabaseSchema CPUFramebufferConversion, FlushTCOnClose, DisableDepthSupport, - WrapGSMem, PreloadFrameData, DisablePartialInvalidation, TargetPartialInvalidation, diff --git a/pcsx2/Pcsx2Config.cpp b/pcsx2/Pcsx2Config.cpp index e3a23edb87..02c74cc688 100644 --- a/pcsx2/Pcsx2Config.cpp +++ b/pcsx2/Pcsx2Config.cpp @@ -431,7 +431,6 @@ Pcsx2Config::GSOptions::GSOptions() GPUPaletteConversion = false; AutoFlushSW = true; PreloadFrameWithGSData = false; - WrapGSMem = false; Mipmap = true; ManualUserHacks = false; @@ -780,7 +779,6 @@ void Pcsx2Config::GSOptions::MaskUserHacks() UserHacks_RoundSprite = 0; UserHacks_AutoFlush = false; PreloadFrameWithGSData = false; - WrapGSMem = false; UserHacks_DisablePartialInvalidation = false; UserHacks_DisableDepthSupport = false; UserHacks_CPUFBConversion = false;