Fix shadow RAM affecting MME methods (#1168)

This commit is contained in:
gdkchan 2020-04-26 19:22:18 -03:00 committed by GitHub
parent 3dfa4232f8
commit 10a2b9dca3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -77,15 +77,19 @@ namespace Ryujinx.Graphics.Gpu.State
{ {
int value = meth.Argument; int value = meth.Argument;
// TODO: Figure out what TrackWithFilter does, compared to Track. // Methods < 0x80 shouldn't be affected by shadow RAM at all.
if (shadowCtrl == ShadowRamControl.Track || if (meth.Method >= 0x80)
shadowCtrl == ShadowRamControl.TrackWithFilter)
{ {
_shadow[meth.Method] = value; // TODO: Figure out what TrackWithFilter does, compared to Track.
} if (shadowCtrl == ShadowRamControl.Track ||
else if (shadowCtrl == ShadowRamControl.Replay) shadowCtrl == ShadowRamControl.TrackWithFilter)
{ {
value = _shadow[meth.Method]; _shadow[meth.Method] = value;
}
else if (shadowCtrl == ShadowRamControl.Replay)
{
value = _shadow[meth.Method];
}
} }
Register register = _registers[meth.Method]; Register register = _registers[meth.Method];