Rewrite shader decoding stage (#2698)
* Rewrite shader decoding stage * Fix P2R constant buffer encoding * Fix PSET/PSETP * PR feedback * Log unimplemented shader instructions * Implement NOP * Remove using * PR feedback
This commit is contained in:
parent
0510fde25a
commit
a7109c767b
168 changed files with 12022 additions and 6388 deletions
|
@ -129,6 +129,31 @@ namespace Ryujinx.Graphics.Shader.Translation
|
|||
}
|
||||
}
|
||||
|
||||
// Remove unreachable blocks.
|
||||
bool hasUnreachable;
|
||||
|
||||
do
|
||||
{
|
||||
hasUnreachable = false;
|
||||
|
||||
for (int blkIndex = 1; blkIndex < blocks.Count; blkIndex++)
|
||||
{
|
||||
BasicBlock block = blocks[blkIndex];
|
||||
|
||||
if (block.Predecessors.Count == 0)
|
||||
{
|
||||
block.Next = null;
|
||||
block.Branch = null;
|
||||
blocks.RemoveAt(blkIndex--);
|
||||
hasUnreachable = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
block.Index = blkIndex;
|
||||
}
|
||||
}
|
||||
} while (hasUnreachable);
|
||||
|
||||
return new ControlFlowGraph(blocks.ToArray());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue