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 5089425852
commit afcd3be25e
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)