mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-10 07:41:44 +00:00
Fix mode and Reg08.H1 decoding on XMAD instruction (#1156)
This commit is contained in:
parent
34d19f381c
commit
1c9aba6de1
1 changed files with 11 additions and 12 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue