mirror of
https://github.com/GreemDev/Ryujinx.git
synced 2024-12-23 06:55:48 +00:00
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.
This commit is contained in:
parent
02e2e561ac
commit
60cf3dfebc
2 changed files with 12 additions and 1 deletions
|
@ -140,7 +140,7 @@ namespace Ryujinx.Graphics.Gpu.Engine.GPFifo
|
||||||
{
|
{
|
||||||
if ((MethodOffset)meth.Method == MethodOffset.BindChannel)
|
if ((MethodOffset)meth.Method == MethodOffset.BindChannel)
|
||||||
{
|
{
|
||||||
_subChannels[meth.SubChannel] = new GpuState();
|
_subChannels[meth.SubChannel].ClearCallbacks();
|
||||||
|
|
||||||
_context.Methods.RegisterCallbacks(_subChannels[meth.SubChannel]);
|
_context.Methods.RegisterCallbacks(_subChannels[meth.SubChannel]);
|
||||||
}
|
}
|
||||||
|
|
|
@ -210,6 +210,17 @@ namespace Ryujinx.Graphics.Gpu.State
|
||||||
_registers[(int)offset].Callback = callback;
|
_registers[(int)offset].Callback = callback;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Clear all registered callbacks.
|
||||||
|
/// </summary>
|
||||||
|
public void ClearCallbacks()
|
||||||
|
{
|
||||||
|
for (int index = 0; index < _registers.Length; index++)
|
||||||
|
{
|
||||||
|
_registers[index].Callback = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Checks if a given register has been modified since the last call to this method.
|
/// Checks if a given register has been modified since the last call to this method.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in a new issue