Fix texture flush from CPU WaitSync regression on OpenGL (#4289)

This commit is contained in:
gdkchan 2023-01-14 11:23:57 -03:00 committed by GitHub
parent cd3a15aea5
commit 93df366b2c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 21 deletions

View file

@ -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)