aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/Image/TextureGroup.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2023-01-14 11:23:57 -0300
committerGitHub <noreply@github.com>2023-01-14 11:23:57 -0300
commit93df366b2c1ddb073410b8ce95c8225f52a49f33 (patch)
tree142be5fccdd553250613b7cda981b6c6bfc20e2d /Ryujinx.Graphics.Gpu/Image/TextureGroup.cs
parentcd3a15aea514234153d0afcaaed0009086492bd9 (diff)
Fix texture flush from CPU WaitSync regression on OpenGL (#4289)1.1.555
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)