forked from Mirror/Ryujinx
Fix shader FMUL32I instruction saturation
This commit is contained in:
parent
f2e84ff566
commit
d3fcab8511
1 changed files with 6 additions and 2 deletions
|
@ -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 a new issue