Implement CSET and CSETP shader instructions (#4318)

* Implement CSET and CSETP shader instructions

* Shader cache version bump

* Fix CC.HI
This commit is contained in:
gdkchan 2023-01-21 12:18:05 -03:00 committed by GitHub
parent 2747f12591
commit 6adf15e479
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 90 additions and 42 deletions

View file

@ -257,7 +257,7 @@ namespace Ryujinx.Graphics.Shader.Instructions
}
else
{
// TODO: Support CC here aswell (condition).
// TODO: Support CC here as well (condition).
foreach (SyncTarget target in targets.Values)
{
PushOpInfo pushOpInfo = target.PushOpInfo;
@ -318,21 +318,5 @@ namespace Ryujinx.Graphics.Shader.Instructions
context.BranchIfTrue(label, pred);
}
}
private static Operand GetCondition(EmitterContext context, Ccc cond, int defaultCond = IrConsts.True)
{
// TODO: More condition codes, figure out how they work.
switch (cond)
{
case Ccc.Eq:
case Ccc.Equ:
return GetZF();
case Ccc.Ne:
case Ccc.Neu:
return context.BitwiseNot(GetZF());
}
return Const(defaultCond);
}
}
}