Fix shader FMUL32I instruction saturation
This commit is contained in:
parent
f2e84ff566
commit
d3fcab8511
@ -87,7 +87,9 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
|||||||
{
|
{
|
||||||
IOpCodeFArith op = (IOpCodeFArith)context.CurrOp;
|
IOpCodeFArith op = (IOpCodeFArith)context.CurrOp;
|
||||||
|
|
||||||
bool negateB = !(op is OpCodeFArithImm32) && op.RawOpCode.Extract(48);
|
bool isImm32 = op is OpCodeFArithImm32;
|
||||||
|
|
||||||
|
bool negateB = !isImm32 && op.RawOpCode.Extract(48);
|
||||||
|
|
||||||
Operand srcA = GetSrcA(context);
|
Operand srcA = GetSrcA(context);
|
||||||
|
|
||||||
@ -109,7 +111,9 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
|||||||
|
|
||||||
Operand dest = GetDest(context);
|
Operand dest = GetDest(context);
|
||||||
|
|
||||||
context.Copy(dest, context.FPSaturate(context.FPMultiply(srcA, srcB), op.Saturate));
|
bool saturate = isImm32 ? op.RawOpCode.Extract(55) : op.Saturate;
|
||||||
|
|
||||||
|
context.Copy(dest, context.FPSaturate(context.FPMultiply(srcA, srcB), saturate));
|
||||||
|
|
||||||
SetFPZnFlags(context, dest, op.SetCondCode);
|
SetFPZnFlags(context, dest, op.SetCondCode);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user