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

@ -78,7 +78,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
private List<BufferMigration> _sources;
private BufferMigration _migrationTarget;
private object _lock = new object();
private readonly object _lock = new();
/// <summary>
/// Whether the modified range list has any entries or not.
@ -125,7 +125,7 @@ namespace Ryujinx.Graphics.Gpu.Memory
for (int i = 0; i < count; i++)
{
BufferModifiedRange overlap = overlaps[i];
if (overlap.Address > address)
{
// The start of the remaining region is uncovered by this overlap. Call the action for it.