Fix MME shadow RAM implementation (#1051)
This commit is contained in:
parent
1c9aba6de1
commit
9261ec6bc8
3 changed files with 50 additions and 59 deletions
|
@ -62,13 +62,13 @@ namespace Ryujinx.Graphics.Gpu
|
|||
/// </summary>
|
||||
/// <param name="mme">Program code</param>
|
||||
/// <param name="state">Current GPU state</param>
|
||||
public void Execute(int[] mme, ShadowRamControl shadowCtrl, GpuState state, GpuState shadowState)
|
||||
public void Execute(int[] mme, ShadowRamControl shadowCtrl, GpuState state)
|
||||
{
|
||||
if (_executionPending)
|
||||
{
|
||||
_executionPending = false;
|
||||
|
||||
_interpreter?.Execute(mme, Position, _argument, shadowCtrl, state, shadowState);
|
||||
_interpreter?.Execute(mme, Position, _argument, shadowCtrl, state);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -101,11 +101,6 @@ namespace Ryujinx.Graphics.Gpu
|
|||
/// </summary>
|
||||
public GpuState State { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Sub-channel shadow GPU state (used as backup storage to restore MME changes).
|
||||
/// </summary>
|
||||
public GpuState ShadowState { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Engine bound to the sub-channel.
|
||||
/// </summary>
|
||||
|
@ -117,7 +112,6 @@ namespace Ryujinx.Graphics.Gpu
|
|||
public SubChannel()
|
||||
{
|
||||
State = new GpuState();
|
||||
ShadowState = new GpuState();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -202,11 +196,7 @@ namespace Ryujinx.Graphics.Gpu
|
|||
}
|
||||
else if (meth.Method < 0xe00)
|
||||
{
|
||||
SubChannel sc = _subChannels[meth.SubChannel];
|
||||
|
||||
sc.ShadowState.Write(meth.Method, meth.Argument);
|
||||
|
||||
sc.State.CallMethod(meth);
|
||||
_subChannels[meth.SubChannel].State.CallMethod(meth, _shadowCtrl);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -223,9 +213,7 @@ namespace Ryujinx.Graphics.Gpu
|
|||
|
||||
if (meth.IsLastCall)
|
||||
{
|
||||
SubChannel sc = _subChannels[meth.SubChannel];
|
||||
|
||||
_macros[macroIndex].Execute(_mme, _shadowCtrl, sc.State, sc.ShadowState);
|
||||
_macros[macroIndex].Execute(_mme, _shadowCtrl, _subChannels[meth.SubChannel].State);
|
||||
|
||||
_context.Methods.PerformDeferredDraws();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue