From 070136b3f7a000e092eef46780091be29c0bc0bf Mon Sep 17 00:00:00 2001
From: gdkchan <gab.dark.100@gmail.com>
Date: Fri, 13 Jan 2023 23:46:45 -0300
Subject: [PATCH] Fix texture modified on CPU from GPU thread after being
 modified on GPU not being updated (#4284)

---
 Ryujinx.Graphics.Gpu/Image/TextureGroup.cs | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs b/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs
index cd17564a01..a6e0616cc3 100644
--- a/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs
@@ -1431,10 +1431,10 @@ namespace Ryujinx.Graphics.Gpu.Image
                 return;
             }
 
+            handle.Sync(_context);
+
             _context.Renderer.BackgroundContextAction(() =>
             {
-                handle.Sync(_context);
-
                 Storage.SignalModifiedDirty();
 
                 lock (handle.Overlaps)