Support shared color mask, implement more shader instructions
Support shared color masks (used by Nouveau and maybe the NVIDIA driver). Support draw buffers (also required by OpenGL). Support viewport transform disable (disabled for now as it breaks some games). Fix instanced rendering draw being ignored for multi draw. Fix IADD and IADD3 immediate shader encodings, that was not matching some ops. Implement FFMA32I shader instruction. Implement IMAD shader instruction.
This commit is contained in:
@ -59,6 +59,26 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||
SetFPZnFlags(context, dest, op.SetCondCode);
|
||||
}
|
||||
|
||||
public static void Ffma32i(EmitterContext context)
|
||||
{
|
||||
IOpCodeFArith op = (IOpCodeFArith)context.CurrOp;
|
||||
|
||||
bool saturate = op.RawOpCode.Extract(55);
|
||||
bool negateA = op.RawOpCode.Extract(56);
|
||||
bool negateC = op.RawOpCode.Extract(57);
|
||||
|
||||
Operand srcA = context.FPNegate(GetSrcA(context), negateA);
|
||||
Operand srcC = context.FPNegate(GetDest(context), negateC);
|
||||
|
||||
Operand srcB = GetSrcB(context);
|
||||
|
||||
Operand dest = GetDest(context);
|
||||
|
||||
context.Copy(dest, context.FPSaturate(context.FPFusedMultiplyAdd(srcA, srcB, srcC), saturate));
|
||||
|
||||
SetFPZnFlags(context, dest, op.SetCondCode);
|
||||
}
|
||||
|
||||
public static void Fmnmx(EmitterContext context)
|
||||
{
|
||||
IOpCodeFArith op = (IOpCodeFArith)context.CurrOp;
|
||||
|
Reference in New Issue
Block a user