GPU: Track buffer migrations and flush source on incomplete copy (#3952)
* Track buffer migrations and flush source on incomplete copy Makes sure that the modified range list is always from the latest iteration of the buffer, and flushes earlier iterations of a buffer if the data has not been migrated yet. * Cleanup 1 * Reduce cost for redundant signal checks on Vulkan * Only inherit the range list if there are pending ranges. * Fix OpenGL * Address Feedback * Whoops
This commit is contained in:
parent
817b89767a
commit
458452279c
11 changed files with 451 additions and 87 deletions
|
@ -40,6 +40,37 @@ namespace Ryujinx.Graphics.OpenGL
|
|||
}
|
||||
}
|
||||
|
||||
public ulong GetCurrent()
|
||||
{
|
||||
lock (_handles)
|
||||
{
|
||||
ulong lastHandle = _firstHandle;
|
||||
|
||||
foreach (SyncHandle handle in _handles)
|
||||
{
|
||||
lock (handle)
|
||||
{
|
||||
if (handle.Handle == IntPtr.Zero)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
if (handle.ID > lastHandle)
|
||||
{
|
||||
WaitSyncStatus syncResult = GL.ClientWaitSync(handle.Handle, _syncFlags, 0);
|
||||
|
||||
if (syncResult == WaitSyncStatus.AlreadySignaled)
|
||||
{
|
||||
lastHandle = handle.ID;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return lastHandle;
|
||||
}
|
||||
}
|
||||
|
||||
public void Wait(ulong id)
|
||||
{
|
||||
SyncHandle result = null;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue