mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-26 06:07:11 +02:00
parent
417df486b1
commit
361d0c5632
622 changed files with 3080 additions and 2652 deletions
|
@ -400,6 +400,8 @@ namespace Ryujinx.Tests.Memory
|
|||
Assert.AreEqual(singlePages[2], combinedHandles.ElementAt(10));
|
||||
}
|
||||
|
||||
static readonly bool[] _expectedPagesModified = [true, false, false];
|
||||
|
||||
[Test]
|
||||
public void PreciseAction()
|
||||
{
|
||||
|
@ -409,7 +411,11 @@ namespace Ryujinx.Tests.Memory
|
|||
PreparePages(granular, 3, PageSize * 3);
|
||||
|
||||
// Add a precise action to the second and third handle in the multiregion.
|
||||
granular.RegisterPreciseAction(PageSize * 4, PageSize * 2, (_, _, _) => { actionTriggered = true; return true; });
|
||||
granular.RegisterPreciseAction(PageSize * 4, PageSize * 2, (_, _, _) =>
|
||||
{
|
||||
actionTriggered = true;
|
||||
return true;
|
||||
});
|
||||
|
||||
// Precise write to first handle in the multiregion.
|
||||
_tracking.VirtualMemoryEvent(PageSize * 3, PageSize, true, precise: true);
|
||||
|
@ -433,7 +439,7 @@ namespace Ryujinx.Tests.Memory
|
|||
Assert.IsTrue(actionTriggered); // Action triggered.
|
||||
|
||||
// Precise writes are ignored on two later handles due to the action returning true.
|
||||
Assert.AreEqual(pagesModified, new bool[] { true, false, false });
|
||||
Assert.AreEqual(pagesModified, _expectedPagesModified);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -329,6 +329,7 @@ namespace Ryujinx.Tests.Memory
|
|||
{
|
||||
_tracking.VirtualMemoryEvent((ulong)random.Next(PageSize), 4, false);
|
||||
}
|
||||
|
||||
Interlocked.Increment(ref signalThreadsDone);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue