summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriwubcode <iwubcode@users.noreply.github.com>2023-03-22 20:56:13 -0500
committeriwubcode <iwubcode@users.noreply.github.com>2023-06-07 18:30:10 -0500
commite831d7b6bb82da618db9f33e62c8f197dec079bf (patch)
tree27c8fdcf4a29c750ca780ffa8f688815cd03133d
parentca8d6748d6409943d758b59bf255a161061a648e (diff)
InputCommon / VideoCommon: remove dynamic input reloading the texture cache, this is no longer needed, assets reload automatically!
-rw-r--r--Source/Core/InputCommon/DynamicInputTextureManager.cpp6
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.cpp26
-rw-r--r--Source/Core/VideoCommon/TextureCacheBase.h5
3 files changed, 5 insertions, 32 deletions
diff --git a/Source/Core/InputCommon/DynamicInputTextureManager.cpp b/Source/Core/InputCommon/DynamicInputTextureManager.cpp
index d3b47089a6..fade2c05d4 100644
--- a/Source/Core/InputCommon/DynamicInputTextureManager.cpp
+++ b/Source/Core/InputCommon/DynamicInputTextureManager.cpp
@@ -42,13 +42,9 @@ void DynamicInputTextureManager::Load()
void DynamicInputTextureManager::GenerateTextures(const Common::IniFile& file,
const std::vector<std::string>& controller_names)
{
- bool any_dirty = false;
for (const auto& configuration : m_configuration)
{
- any_dirty |= configuration.GenerateTextures(file, controller_names);
+ (void)configuration.GenerateTextures(file, controller_names);
}
-
- if (any_dirty && g_texture_cache && Core::GetState() != Core::State::Starting)
- g_texture_cache->ForceReloadTextures();
}
} // namespace InputCommon
diff --git a/Source/Core/VideoCommon/TextureCacheBase.cpp b/Source/Core/VideoCommon/TextureCacheBase.cpp
index 5bb8993897..fc5c26b5a8 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.cpp
+++ b/Source/Core/VideoCommon/TextureCacheBase.cpp
@@ -145,17 +145,6 @@ void TextureCacheBase::Invalidate()
texture_pool.clear();
}
-void TextureCacheBase::ForceReload()
-{
- Invalidate();
-
- // Clear all current hires textures, they are invalid
- HiresTexture::Clear();
-
- // Load fresh
- HiresTexture::Update();
-}
-
void TextureCacheBase::OnConfigChanged(const VideoConfig& config)
{
if (config.bHiresTextures != backup_config.hires_textures ||
@@ -781,17 +770,10 @@ void TextureCacheBase::DoLoadState(PointerWrap& p)
void TextureCacheBase::OnFrameEnd()
{
- if (m_force_reload_textures.TestAndClear())
- {
- ForceReload();
- }
- else
- {
- // Flush any outstanding EFB copies to RAM, in case the game is running at an uncapped frame
- // rate and not waiting for vblank. Otherwise, we'd end up with a huge list of pending
- // copies.
- FlushEFBCopies();
- }
+ // Flush any outstanding EFB copies to RAM, in case the game is running at an uncapped frame
+ // rate and not waiting for vblank. Otherwise, we'd end up with a huge list of pending
+ // copies.
+ FlushEFBCopies();
Cleanup(g_presenter->FrameCount());
}
diff --git a/Source/Core/VideoCommon/TextureCacheBase.h b/Source/Core/VideoCommon/TextureCacheBase.h
index bcfa7898fd..766b21bc80 100644
--- a/Source/Core/VideoCommon/TextureCacheBase.h
+++ b/Source/Core/VideoCommon/TextureCacheBase.h
@@ -272,7 +272,6 @@ public:
void Shutdown();
void OnConfigChanged(const VideoConfig& config);
- void ForceReload();
// Removes textures which aren't used for more than TEXTURE_KILL_THRESHOLD frames,
// frameCount is the current frame number.
@@ -313,9 +312,6 @@ public:
static bool AllCopyFilterCoefsNeeded(const std::array<u32, 3>& coefficients);
static bool CopyFilterCanOverflow(const std::array<u32, 3>& coefficients);
- // Will forcibly reload all textures when the frame next ends
- void ForceReloadTextures() { m_force_reload_textures.Set(); }
-
protected:
// Decodes the specified data to the GPU texture specified by entry.
// Returns false if the configuration is not supported.
@@ -468,7 +464,6 @@ private:
void OnFrameEnd();
- Common::Flag m_force_reload_textures;
Common::EventHook m_frame_event =
AfterFrameEvent::Register([this] { OnFrameEnd(); }, "TextureCache");
};