1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-11-30 20:12:01 +00:00

Fix mode and Reg08.H1 decoding on XMAD instruction (#1156)

This commit is contained in:
gdkchan 2020-04-25 10:40:29 -03:00 committed by GitHub
parent 34d19f381c
commit 1c9aba6de1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -598,25 +598,24 @@ namespace Ryujinx.Graphics.Shader.Instructions
bool signedA = context.CurrOp.RawOpCode.Extract(48);
bool signedB = context.CurrOp.RawOpCode.Extract(49);
bool highA = context.CurrOp.RawOpCode.Extract(53);
bool isReg = (op is OpCodeAluReg) && !(op is OpCodeAluRegCbuf);
bool isImm = (op is OpCodeAluImm);
XmadCMode mode = isReg || isImm
? (XmadCMode)context.CurrOp.RawOpCode.Extract(50, 3)
: (XmadCMode)context.CurrOp.RawOpCode.Extract(50, 2);
bool highB = false;
XmadCMode mode;
if (op is OpCodeAluReg)
if (isReg)
{
highB = context.CurrOp.RawOpCode.Extract(35);
mode = (XmadCMode)context.CurrOp.RawOpCode.Extract(50, 3);
}
else
{
mode = (XmadCMode)context.CurrOp.RawOpCode.Extract(50, 2);
if (!(op is OpCodeAluImm))
else if (!isImm)
{
highB = context.CurrOp.RawOpCode.Extract(52);
}
}
Operand srcA = GetSrcA(context);
Operand srcB = GetSrcB(context);