aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Gpu/State
diff options
context:
space:
mode:
authorMary <me@thog.eu>2021-06-09 00:50:18 +0200
committerGitHub <noreply@github.com>2021-06-09 00:50:18 +0200
commit60cf3dfebc6bc573fb90a1b9645bca43da3d65f6 (patch)
treeefefc404f8770751a240afb5e024536171df59ce /Ryujinx.Graphics.Gpu/State
parent02e2e561ac136473d4d259d872dc5e211c6a3e67 (diff)
Do not clear gpu subchannel state on BindChannel (#2348)
This fixes a regression caused by #980, that was causing a crash on New Super Lucky's Tale. As always, this need feedback on possible regression on any games. Fix #2343.
Diffstat (limited to 'Ryujinx.Graphics.Gpu/State')
-rw-r--r--Ryujinx.Graphics.Gpu/State/GpuState.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Gpu/State/GpuState.cs b/Ryujinx.Graphics.Gpu/State/GpuState.cs
index 4b93dd45..16dad5c1 100644
--- a/Ryujinx.Graphics.Gpu/State/GpuState.cs
+++ b/Ryujinx.Graphics.Gpu/State/GpuState.cs
@@ -211,6 +211,17 @@ namespace Ryujinx.Graphics.Gpu.State
}
/// <summary>
+ /// Clear all registered callbacks.
+ /// </summary>
+ public void ClearCallbacks()
+ {
+ for (int index = 0; index < _registers.Length; index++)
+ {
+ _registers[index].Callback = null;
+ }
+ }
+
+ /// <summary>
/// Checks if a given register has been modified since the last call to this method.
/// </summary>
/// <param name="offset">Register offset</param>