mirror of
https://github.com/ryujinx-mirror/ryujinx.git
synced 2024-12-23 14:25:46 +00:00
Force command flush after creating a syncpoint (#2056)
* Force command flush after creating GL sync * This is not required, as the commands were flushed on creation. * Move comment.
This commit is contained in:
parent
4443e18909
commit
f2cdceb846
1 changed files with 5 additions and 2 deletions
|
@ -26,6 +26,9 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
Handle = GL.FenceSync(SyncCondition.SyncGpuCommandsComplete, WaitSyncFlags.None)
|
Handle = GL.FenceSync(SyncCondition.SyncGpuCommandsComplete, WaitSyncFlags.None)
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Force commands to flush up to the syncpoint.
|
||||||
|
GL.ClientWaitSync(handle.Handle, ClientWaitSyncFlags.SyncFlushCommandsBit, 0);
|
||||||
|
|
||||||
lock (Handles)
|
lock (Handles)
|
||||||
{
|
{
|
||||||
Handles.Add(handle);
|
Handles.Add(handle);
|
||||||
|
@ -62,7 +65,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
WaitSyncStatus syncResult = GL.ClientWaitSync(result.Handle, ClientWaitSyncFlags.SyncFlushCommandsBit, 1000000000);
|
WaitSyncStatus syncResult = GL.ClientWaitSync(result.Handle, ClientWaitSyncFlags.None, 1000000000);
|
||||||
|
|
||||||
if (syncResult == WaitSyncStatus.TimeoutExpired)
|
if (syncResult == WaitSyncStatus.TimeoutExpired)
|
||||||
{
|
{
|
||||||
|
@ -86,7 +89,7 @@ namespace Ryujinx.Graphics.OpenGL
|
||||||
|
|
||||||
if (first == null) break;
|
if (first == null) break;
|
||||||
|
|
||||||
WaitSyncStatus syncResult = GL.ClientWaitSync(first.Handle, ClientWaitSyncFlags.SyncFlushCommandsBit, 0);
|
WaitSyncStatus syncResult = GL.ClientWaitSync(first.Handle, ClientWaitSyncFlags.None, 0);
|
||||||
|
|
||||||
if (syncResult == WaitSyncStatus.AlreadySignaled)
|
if (syncResult == WaitSyncStatus.AlreadySignaled)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue