mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-23 06:41:22 -08:00
When batching, don't place barriers between every copy
This commit is contained in:
parent
1a85c9a00b
commit
a46b1bd88c
@ -49,12 +49,16 @@ namespace Ryujinx.Graphics.OpenGL.Queries
|
||||
GL.BeginQuery(_type, Query);
|
||||
}
|
||||
|
||||
public unsafe void CopyQueryResult()
|
||||
public unsafe void CopyQueryResult(bool withBarrier)
|
||||
{
|
||||
GL.BindBuffer(BufferTarget.QueryBuffer, _buffer);
|
||||
GL.GetQueryObject(Query, GetQueryObjectParam.QueryResult, (long*)0);
|
||||
|
||||
if (withBarrier)
|
||||
{
|
||||
GL.MemoryBarrier(MemoryBarrierFlags.QueryBufferBarrierBit | MemoryBarrierFlags.ClientMappedBufferBarrierBit);
|
||||
}
|
||||
}
|
||||
|
||||
public void End(bool withResult)
|
||||
{
|
||||
@ -64,7 +68,7 @@ namespace Ryujinx.Graphics.OpenGL.Queries
|
||||
{
|
||||
if (!_parent.QueueCopy(this))
|
||||
{
|
||||
CopyQueryResult();
|
||||
CopyQueryResult(true);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -66,9 +66,10 @@ namespace Ryujinx.Graphics.OpenGL.Queries
|
||||
{
|
||||
if (_queuedCopies.Count > 0)
|
||||
{
|
||||
int i = 0;
|
||||
foreach (BufferedQuery query in _queuedCopies)
|
||||
{
|
||||
query.CopyQueryResult();
|
||||
query.CopyQueryResult(_queuedCopies.Count == ++i);
|
||||
}
|
||||
|
||||
_queuedCopies.Clear();
|
||||
|
Loading…
Reference in New Issue
Block a user