aboutsummaryrefslogtreecommitdiff
path: root/src/Ryujinx.Graphics.Vulkan
diff options
context:
space:
mode:
authorMarco Carvalho <marcolucio27@gmail.com>2023-06-14 21:34:55 -0300
committerGitHub <noreply@github.com>2023-06-15 00:34:55 +0000
commit82f90704a0662bba7254cb0bc262d785acdabc67 (patch)
tree72d32a909661d7f26217eee66ffe1d068dcfe101 /src/Ryujinx.Graphics.Vulkan
parentf978d3726a87dcc067abb2541b96b831e4390fbb (diff)
Blocks should be synchronized on read-only fields (#5212)
* Blocks should be synchronized on read-only fields * more readonlys * fix alignment * more * Update ISelfController.cs * simplify new * simplify new
Diffstat (limited to 'src/Ryujinx.Graphics.Vulkan')
-rw-r--r--src/Ryujinx.Graphics.Vulkan/Queries/CounterQueue.cs2
-rw-r--r--src/Ryujinx.Graphics.Vulkan/Queries/CounterQueueEvent.cs2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueue.cs b/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueue.cs
index c30d91c4..2fdddaea 100644
--- a/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueue.cs
+++ b/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueue.cs
@@ -24,7 +24,7 @@ namespace Ryujinx.Graphics.Vulkan.Queries
private ulong _accumulatedCounter;
private int _waiterCount;
- private object _lock = new object();
+ private readonly object _lock = new();
private Queue<BufferedQuery> _queryPool;
private AutoResetEvent _queuedEvent = new AutoResetEvent(false);
diff --git a/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueueEvent.cs b/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueueEvent.cs
index d3aedb2f..9d0a674b 100644
--- a/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueueEvent.cs
+++ b/src/Ryujinx.Graphics.Vulkan/Queries/CounterQueueEvent.cs
@@ -22,7 +22,7 @@ namespace Ryujinx.Graphics.Vulkan.Queries
private bool _hostAccessReserved = false;
private int _refCount = 1; // Starts with a reference from the counter queue.
- private object _lock = new object();
+ private readonly object _lock = new();
private ulong _result = ulong.MaxValue;
private double _divisor = 1f;