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
This commit is contained in:
Marco Carvalho 2023-06-14 21:34:55 -03:00 committed by GitHub
parent f978d3726a
commit 82f90704a0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 60 additions and 68 deletions

View file

@ -21,7 +21,7 @@ namespace Ryujinx.Graphics.OpenGL.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);

View file

@ -24,7 +24,7 @@ namespace Ryujinx.Graphics.OpenGL.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;

View file

@ -20,7 +20,7 @@ namespace Ryujinx.Graphics.OpenGL
{
private const int DisposedLiveFrames = 2;
private readonly object _lock = new object();
private readonly object _lock = new();
private readonly Dictionary<TextureCreateInfo, List<DisposedTexture>> _textures = new Dictionary<TextureCreateInfo, List<DisposedTexture>>();
/// <summary>