aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Instructions
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2021-01-13 21:07:50 -0300
committerGitHub <noreply@github.com>2021-01-14 01:07:50 +0100
commit5be6ec63648eec8ad108c3b4bd681e5397afb646 (patch)
tree938fc120bc57e93a5eced3cf7c106d9e16e5e331 /Ryujinx.Graphics.Shader/Instructions
parent996e6905ba0ec3d8416c9332109d0805f68167e7 (diff)
Fix shader LOP3 predicate write condition (#1910)
* Fix LOP3 predicate write condition * Bump shader cache version
Diffstat (limited to 'Ryujinx.Graphics.Shader/Instructions')
-rw-r--r--Ryujinx.Graphics.Shader/Instructions/InstEmitAlu.cs12
1 files changed, 6 insertions, 6 deletions
diff --git a/Ryujinx.Graphics.Shader/Instructions/InstEmitAlu.cs b/Ryujinx.Graphics.Shader/Instructions/InstEmitAlu.cs
index 64ac0eb7..37c17ecc 100644
--- a/Ryujinx.Graphics.Shader/Instructions/InstEmitAlu.cs
+++ b/Ryujinx.Graphics.Shader/Instructions/InstEmitAlu.cs
@@ -459,7 +459,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
case LogicalOperation.ExclusiveOr: res = context.BitwiseExclusiveOr(srcA, srcB); break;
}
- EmitLopPredWrite(context, op, res);
+ EmitLopPredWrite(context, op, res, (ConditionalOperation)context.CurrOp.RawOpCode.Extract(44, 2));
Operand dest = GetDest(context);
@@ -486,7 +486,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
if (regVariant)
{
- EmitLopPredWrite(context, op, res);
+ EmitLopPredWrite(context, op, res, (ConditionalOperation)context.CurrOp.RawOpCode.Extract(36, 2));
}
Operand dest = GetDest(context);
@@ -917,21 +917,21 @@ namespace Ryujinx.Graphics.Shader.Instructions
return res;
}
- private static void EmitLopPredWrite(EmitterContext context, IOpCodeLop op, Operand result)
+ private static void EmitLopPredWrite(EmitterContext context, IOpCodeLop op, Operand result, ConditionalOperation condOp)
{
if (op is OpCodeLop opLop && !opLop.Predicate48.IsPT)
{
Operand pRes;
- if (opLop.CondOp == ConditionalOperation.False)
+ if (condOp == ConditionalOperation.False)
{
pRes = Const(IrConsts.False);
}
- else if (opLop.CondOp == ConditionalOperation.True)
+ else if (condOp == ConditionalOperation.True)
{
pRes = Const(IrConsts.True);
}
- else if (opLop.CondOp == ConditionalOperation.Zero)
+ else if (condOp == ConditionalOperation.Zero)
{
pRes = context.ICompareEqual(result, Const(0));
}