mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-11-10 10:51:43 +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 signedA = context.CurrOp.RawOpCode.Extract(48);
|
||||||
bool signedB = context.CurrOp.RawOpCode.Extract(49);
|
bool signedB = context.CurrOp.RawOpCode.Extract(49);
|
||||||
bool highA = context.CurrOp.RawOpCode.Extract(53);
|
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;
|
bool highB = false;
|
||||||
|
|
||||||
XmadCMode mode;
|
if (isReg)
|
||||||
|
|
||||||
if (op is OpCodeAluReg)
|
|
||||||
{
|
{
|
||||||
highB = context.CurrOp.RawOpCode.Extract(35);
|
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);
|
Operand srcA = GetSrcA(context);
|
||||||
Operand srcB = GetSrcB(context);
|
Operand srcB = GetSrcB(context);
|
||||||
|
|
Loading…
Reference in a new issue