aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Instructions/InstEmitHelper.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2020-04-14 20:01:26 -0300
committerGitHub <noreply@github.com>2020-04-15 09:01:26 +1000
commit92cc37e365d02aaa2e2d499acac6bdcb7a13d069 (patch)
treeab3c03de7e799c0668385b3441303fff58f7636e /Ryujinx.Graphics.Shader/Instructions/InstEmitHelper.cs
parentad3d2fb5a9326577a9ea1b67e06a34b09236dd8d (diff)
Fix negation of HADD2 constant buffer source (#1116)
Diffstat (limited to 'Ryujinx.Graphics.Shader/Instructions/InstEmitHelper.cs')
-rw-r--r--Ryujinx.Graphics.Shader/Instructions/InstEmitHelper.cs7
1 files changed, 6 insertions, 1 deletions
diff --git a/Ryujinx.Graphics.Shader/Instructions/InstEmitHelper.cs b/Ryujinx.Graphics.Shader/Instructions/InstEmitHelper.cs
index 09d90e15..352d16c0 100644
--- a/Ryujinx.Graphics.Shader/Instructions/InstEmitHelper.cs
+++ b/Ryujinx.Graphics.Shader/Instructions/InstEmitHelper.cs
@@ -173,7 +173,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
return FPAbsNeg(context, operands, absoluteA, negateA);
}
- public static Operand[] GetHalfSrcB(EmitterContext context)
+ public static Operand[] GetHalfSrcB(EmitterContext context, bool isMul = false)
{
OpCode op = context.CurrOp;
@@ -193,6 +193,11 @@ namespace Ryujinx.Graphics.Shader.Instructions
swizzle = FPHalfSwizzle.FP32;
absoluteB = op.RawOpCode.Extract(54);
+
+ if (!isMul)
+ {
+ negateB = op.RawOpCode.Extract(56);
+ }
}
Operand[] operands = GetHalfUnpacked(context, GetSrcB(context), swizzle);