summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFernando Sahmkow <fsahmkow27@gmail.com>2020-02-16 22:13:19 +0100
committerFernando Sahmkow <fsahmkow27@gmail.com>2020-04-22 17:36:09 +0200
commited7e9657120faea849af2933e539c72bc961c2a9 (patch)
treea0905640fa410696ede1424e8cb00bff8f6cda6f
parentGPU: Delay Fences. (diff)
downloadyuzu-ed7e9657120faea849af2933e539c72bc961c2a9.tar
yuzu-ed7e9657120faea849af2933e539c72bc961c2a9.tar.gz
yuzu-ed7e9657120faea849af2933e539c72bc961c2a9.tar.bz2
yuzu-ed7e9657120faea849af2933e539c72bc961c2a9.tar.lz
yuzu-ed7e9657120faea849af2933e539c72bc961c2a9.tar.xz
yuzu-ed7e9657120faea849af2933e539c72bc961c2a9.tar.zst
yuzu-ed7e9657120faea849af2933e539c72bc961c2a9.zip
-rw-r--r--src/video_core/texture_cache/texture_cache.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/video_core/texture_cache/texture_cache.h b/src/video_core/texture_cache/texture_cache.h
index c23b9f9b9..d8c8390bb 100644
--- a/src/video_core/texture_cache/texture_cache.h
+++ b/src/video_core/texture_cache/texture_cache.h
@@ -233,8 +233,14 @@ public:
auto surface_view = GetSurface(gpu_addr, *cpu_addr,
SurfaceParams::CreateForFramebuffer(system, index), true);
- if (render_targets[index].target)
- render_targets[index].target->MarkAsRenderTarget(false, NO_RT);
+ if (render_targets[index].target) {
+ auto& surface = render_targets[index].target;
+ surface->MarkAsRenderTarget(false, NO_RT);
+ const auto& cr_params = surface->GetSurfaceParams();
+ if (!cr_params.is_tiled) {
+ FlushSurface(surface);
+ }
+ }
render_targets[index].target = surface_view.first;
render_targets[index].view = surface_view.second;
if (render_targets[index].target)