mirror of
https://github.com/Ryujinx-NX/Ryujinx.git
synced 2024-11-14 21:17:43 -07:00
Remove some unused args on the shader translator
This commit is contained in:
parent
6407729a1d
commit
912e43e979
@ -125,8 +125,8 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||
{
|
||||
// Add carry, or subtract borrow.
|
||||
res = context.IAdd(res, isSubtraction
|
||||
? context.BitwiseNot(GetCF(context))
|
||||
: context.BitwiseAnd(GetCF(context), Const(1)));
|
||||
? context.BitwiseNot(GetCF())
|
||||
: context.BitwiseAnd(GetCF(), Const(1)));
|
||||
}
|
||||
|
||||
SetIaddFlags(context, res, srcA, srcB, op.SetCondCode, op.Extended, isSubtraction);
|
||||
@ -693,7 +693,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||
if (extended)
|
||||
{
|
||||
// Add with carry.
|
||||
res = context.IAdd(res, context.BitwiseAnd(GetCF(context), Const(1)));
|
||||
res = context.IAdd(res, context.BitwiseAnd(GetCF(), Const(1)));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -806,7 +806,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||
if (!extended || isSubtraction)
|
||||
{
|
||||
// C = d < a
|
||||
context.Copy(GetCF(context), context.ICompareLessUnsigned(res, srcA));
|
||||
context.Copy(GetCF(), context.ICompareLessUnsigned(res, srcA));
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -814,9 +814,9 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||
Operand tempC0 = context.ICompareEqual (res, srcA);
|
||||
Operand tempC1 = context.ICompareLessUnsigned(res, srcA);
|
||||
|
||||
tempC0 = context.BitwiseAnd(tempC0, GetCF(context));
|
||||
tempC0 = context.BitwiseAnd(tempC0, GetCF());
|
||||
|
||||
context.Copy(GetCF(context), context.BitwiseOr(tempC0, tempC1));
|
||||
context.Copy(GetCF(), context.BitwiseOr(tempC0, tempC1));
|
||||
}
|
||||
|
||||
// V = (d ^ a) & ~(a ^ b) < 0
|
||||
@ -827,7 +827,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||
|
||||
Operand tempV = context.BitwiseAnd(tempV0, tempV1);
|
||||
|
||||
context.Copy(GetVF(context), context.ICompareLess(tempV, Const(0)));
|
||||
context.Copy(GetVF(), context.ICompareLess(tempV, Const(0)));
|
||||
|
||||
SetZnFlags(context, res, setCC: true, extended: extended);
|
||||
}
|
||||
|
@ -71,26 +71,26 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||
// previous result when extended is specified, to ensure
|
||||
// we have ZF set only if all words are zero, and not just
|
||||
// the last one.
|
||||
Operand oldZF = GetZF(context);
|
||||
Operand oldZF = GetZF();
|
||||
|
||||
Operand res = context.BitwiseAnd(context.ICompareEqual(dest, Const(0)), oldZF);
|
||||
|
||||
context.Copy(GetZF(context), res);
|
||||
context.Copy(GetZF(), res);
|
||||
}
|
||||
else
|
||||
{
|
||||
context.Copy(GetZF(context), context.ICompareEqual(dest, Const(0)));
|
||||
context.Copy(GetZF(), context.ICompareEqual(dest, Const(0)));
|
||||
}
|
||||
|
||||
context.Copy(GetNF(context), context.ICompareLess(dest, Const(0)));
|
||||
context.Copy(GetNF(), context.ICompareLess(dest, Const(0)));
|
||||
}
|
||||
|
||||
public static void SetFPZnFlags(EmitterContext context, Operand dest, bool setCC)
|
||||
{
|
||||
if (setCC)
|
||||
{
|
||||
context.Copy(GetZF(context), context.FPCompareEqual(dest, ConstF(0)));
|
||||
context.Copy(GetNF(context), context.FPCompareLess (dest, ConstF(0)));
|
||||
context.Copy(GetZF(), context.FPCompareEqual(dest, ConstF(0)));
|
||||
context.Copy(GetNF(), context.FPCompareLess (dest, ConstF(0)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -169,10 +169,10 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||
{
|
||||
case Condition.Equal:
|
||||
case Condition.EqualUnordered:
|
||||
return GetZF(context);
|
||||
return GetZF();
|
||||
case Condition.NotEqual:
|
||||
case Condition.NotEqualUnordered:
|
||||
return context.BitwiseNot(GetZF(context));
|
||||
return context.BitwiseNot(GetZF());
|
||||
}
|
||||
|
||||
return Const(IrConsts.True);
|
||||
|
@ -9,22 +9,22 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
||||
{
|
||||
static class InstEmitHelper
|
||||
{
|
||||
public static Operand GetZF(EmitterContext context)
|
||||
public static Operand GetZF()
|
||||
{
|
||||
return Register(0, RegisterType.Flag);
|
||||
}
|
||||
|
||||
public static Operand GetNF(EmitterContext context)
|
||||
public static Operand GetNF()
|
||||
{
|
||||
return Register(1, RegisterType.Flag);
|
||||
}
|
||||
|
||||
public static Operand GetCF(EmitterContext context)
|
||||
public static Operand GetCF()
|
||||
{
|
||||
return Register(2, RegisterType.Flag);
|
||||
}
|
||||
|
||||
public static Operand GetVF(EmitterContext context)
|
||||
public static Operand GetVF()
|
||||
{
|
||||
return Register(3, RegisterType.Flag);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user