Implement shader LEA instruction and improve bindless image load/store (#1355)
This commit is contained in:
parent
76e5af967a
commit
e13154c83d
7 changed files with 82 additions and 43 deletions
|
@ -384,6 +384,27 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
|||
context.Copy(Register(op.Predicate0), p1Res);
|
||||
}
|
||||
|
||||
public static void Lea(EmitterContext context)
|
||||
{
|
||||
OpCodeAlu op = (OpCodeAlu)context.CurrOp;
|
||||
|
||||
bool negateA = op.RawOpCode.Extract(45);
|
||||
|
||||
int shift = op.RawOpCode.Extract(39, 5);
|
||||
|
||||
Operand srcA = GetSrcA(context);
|
||||
Operand srcB = GetSrcB(context);
|
||||
|
||||
srcA = context.ShiftLeft(srcA, Const(shift));
|
||||
srcA = context.INegate(srcA, negateA);
|
||||
|
||||
Operand res = context.IAdd(srcA, srcB);
|
||||
|
||||
context.Copy(GetDest(context), res);
|
||||
|
||||
// TODO: CC, X
|
||||
}
|
||||
|
||||
public static void Lop(EmitterContext context)
|
||||
{
|
||||
IOpCodeLop op = (IOpCodeLop)context.CurrOp;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue