1
0
Fork 0
mirror of https://github.com/Ryujinx/Ryujinx.git synced 2024-10-01 12:30:00 +02: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,24 +598,23 @@ 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 highB = false;
XmadCMode mode;
bool isReg = (op is OpCodeAluReg) && !(op is OpCodeAluRegCbuf);
bool isImm = (op is OpCodeAluImm);
if (op is OpCodeAluReg)
XmadCMode mode = isReg || isImm
? (XmadCMode)context.CurrOp.RawOpCode.Extract(50, 3)
: (XmadCMode)context.CurrOp.RawOpCode.Extract(50, 2);
bool highB = false;
if (isReg)
{
highB = context.CurrOp.RawOpCode.Extract(35);
mode = (XmadCMode)context.CurrOp.RawOpCode.Extract(50, 3);
}
else
else if (!isImm)
{
mode = (XmadCMode)context.CurrOp.RawOpCode.Extract(50, 2);
if (!(op is OpCodeAluImm))
{
highB = context.CurrOp.RawOpCode.Extract(52);
}
highB = context.CurrOp.RawOpCode.Extract(52);
}
Operand srcA = GetSrcA(context);