summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/RenderBase.cpp
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2020-10-20 02:10:29 +0200
committerGitHub <noreply@github.com>2020-10-20 02:10:29 +0200
commitfc3b474cceb2a24df21640140be4beb95b9b9fd1 (patch)
tree84c89656ad79357c819b129a927db20cec1cdf9e /Source/Core/VideoCommon/RenderBase.cpp
parentb26c2e7adb80436f131f1a50e462ee7c25792c48 (diff)
parent4fff04db3ce16c72d8b3b95df2285a129605fde4 (diff)
Merge pull request #8318 from iwubcode/dynamic_input_textures
InputCommon: Dynamic Input Textures
Diffstat (limited to 'Source/Core/VideoCommon/RenderBase.cpp')
-rw-r--r--Source/Core/VideoCommon/RenderBase.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp
index a60f9b9f91..4777314194 100644
--- a/Source/Core/VideoCommon/RenderBase.cpp
+++ b/Source/Core/VideoCommon/RenderBase.cpp
@@ -1138,6 +1138,11 @@ void Renderer::EndUIFrame()
BeginImGuiFrame();
}
+void Renderer::ForceReloadTextures()
+{
+ m_force_reload_textures.Set();
+}
+
// Heuristic to detect if a GameCube game is in 16:9 anamorphic widescreen mode.
void Renderer::UpdateWidescreenHeuristic()
{
@@ -1302,9 +1307,17 @@ void Renderer::Swap(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height, u6
// state changes the specialized shader will not take over.
g_vertex_manager->InvalidatePipelineObject();
- // 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.
- g_texture_cache->FlushEFBCopies();
+ if (m_force_reload_textures.TestAndClear())
+ {
+ g_texture_cache->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.
+ g_texture_cache->FlushEFBCopies();
+ }
if (!is_duplicate_frame)
{