Fix branch with CC and predicate, and a case of SYNC propagation (#967)
This commit is contained in:
parent
68e15c1a74
commit
54501962f6
2 changed files with 40 additions and 5 deletions
|
@ -145,10 +145,24 @@ namespace Ryujinx.Graphics.Shader.Instructions
|
|||
|
||||
if (op is OpCodeBranch opBranch && opBranch.Condition != Condition.Always)
|
||||
{
|
||||
pred = context.BitwiseAnd(pred, GetCondition(context, opBranch.Condition));
|
||||
}
|
||||
Operand cond = GetCondition(context, opBranch.Condition);
|
||||
|
||||
if (op.Predicate.IsPT)
|
||||
if (op.Predicate.IsPT)
|
||||
{
|
||||
pred = cond;
|
||||
}
|
||||
else if (op.InvertPredicate)
|
||||
{
|
||||
pred = context.BitwiseAnd(context.BitwiseNot(pred), cond);
|
||||
}
|
||||
else
|
||||
{
|
||||
pred = context.BitwiseAnd(pred, cond);
|
||||
}
|
||||
|
||||
context.BranchIfTrue(label, pred);
|
||||
}
|
||||
else if (op.Predicate.IsPT)
|
||||
{
|
||||
context.Branch(label);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue