aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Memory/Tracking/VirtualRegion.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2023-02-16 18:28:49 -0300
committerGitHub <noreply@github.com>2023-02-16 18:28:49 -0300
commitefb135b74c9c0ff1de2dfd7d2a431bd23185ca66 (patch)
tree4defd89a4473e8d1149e041e98171d1b92fa18f2 /Ryujinx.Memory/Tracking/VirtualRegion.cs
parenta707842e14dde468781270198ae63757ca3c2716 (diff)
Clear CPU side data on GPU buffer clears (#4125)1.1.624
* Clear CPU side data on GPU buffer clears * Implement tracked fill operation that can signal other resource types except buffer * Fix tests, add missing XML doc * PR feedback
Diffstat (limited to 'Ryujinx.Memory/Tracking/VirtualRegion.cs')
-rw-r--r--Ryujinx.Memory/Tracking/VirtualRegion.cs16
1 files changed, 12 insertions, 4 deletions
diff --git a/Ryujinx.Memory/Tracking/VirtualRegion.cs b/Ryujinx.Memory/Tracking/VirtualRegion.cs
index 57a0344a..9651426b 100644
--- a/Ryujinx.Memory/Tracking/VirtualRegion.cs
+++ b/Ryujinx.Memory/Tracking/VirtualRegion.cs
@@ -19,19 +19,24 @@ namespace Ryujinx.Memory.Tracking
_tracking = tracking;
}
- public override void Signal(ulong address, ulong size, bool write)
+ /// <inheritdoc/>
+ public override void Signal(ulong address, ulong size, bool write, int? exemptId)
{
IList<RegionHandle> handles = Handles;
for (int i = 0; i < handles.Count; i++)
{
- handles[i].Signal(address, size, write, ref handles);
+ if (exemptId == null || handles[i].Id != exemptId.Value)
+ {
+ handles[i].Signal(address, size, write, ref handles);
+ }
}
UpdateProtection();
}
- public override void SignalPrecise(ulong address, ulong size, bool write)
+ /// <inheritdoc/>
+ public override void SignalPrecise(ulong address, ulong size, bool write, int? exemptId)
{
IList<RegionHandle> handles = Handles;
@@ -39,7 +44,10 @@ namespace Ryujinx.Memory.Tracking
for (int i = 0; i < handles.Count; i++)
{
- allPrecise &= handles[i].SignalPrecise(address, size, write, ref handles);
+ if (exemptId == null || handles[i].Id != exemptId.Value)
+ {
+ allPrecise &= handles[i].SignalPrecise(address, size, write, ref handles);
+ }
}
// Only update protection if a regular signal handler was called.