diff options
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Queries/CounterQueue.cs')
-rw-r--r-- | Ryujinx.Graphics.OpenGL/Queries/CounterQueue.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Queries/CounterQueue.cs b/Ryujinx.Graphics.OpenGL/Queries/CounterQueue.cs index 84b2bfdc..e0aafa6f 100644 --- a/Ryujinx.Graphics.OpenGL/Queries/CounterQueue.cs +++ b/Ryujinx.Graphics.OpenGL/Queries/CounterQueue.cs @@ -13,6 +13,8 @@ namespace Ryujinx.Graphics.OpenGL.Queries public CounterType Type { get; } public bool Disposed { get; private set; } + private readonly Pipeline _pipeline; + private Queue<CounterQueueEvent> _events = new Queue<CounterQueueEvent>(); private CounterQueueEvent _current; @@ -28,10 +30,12 @@ namespace Ryujinx.Graphics.OpenGL.Queries private Thread _consumerThread; - internal CounterQueue(CounterType type) + internal CounterQueue(Pipeline pipeline, CounterType type) { Type = type; + _pipeline = pipeline; + QueryTarget glType = GetTarget(Type); _queryPool = new Queue<BufferedQuery>(QueryPoolInitialSize); @@ -119,7 +123,7 @@ namespace Ryujinx.Graphics.OpenGL.Queries _current.ReserveForHostAccess(); } - _current.Complete(draws > 0); + _current.Complete(draws > 0, _pipeline.GetCounterDivisor(Type)); _events.Enqueue(_current); _current.OnResult += resultHandler; |