aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Ryujinx.Graphics.Gpu/Image/TextureGroup.cs')
-rw-r--r--Ryujinx.Graphics.Gpu/Image/TextureGroup.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs b/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs
index a6e0616c..c167dc0d 100644
--- a/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs
+++ b/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs
@@ -1431,10 +1431,21 @@ namespace Ryujinx.Graphics.Gpu.Image
return;
}
- handle.Sync(_context);
+ bool isGpuThread = _context.IsGpuThread();
+
+ if (isGpuThread)
+ {
+ // No need to wait if we're on the GPU thread, we can just clear the modified flag immediately.
+ handle.Modified = false;
+ }
_context.Renderer.BackgroundContextAction(() =>
{
+ if (!isGpuThread)
+ {
+ handle.Sync(_context);
+ }
+
Storage.SignalModifiedDirty();
lock (handle.Overlaps)