diff options
Diffstat (limited to 'Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs')
-rw-r--r-- | Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs index 497cffc8..4a0ea846 100644 --- a/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs +++ b/Ryujinx.Graphics.Shader/StructuredIr/StructuredProgram.cs @@ -51,9 +51,9 @@ namespace Ryujinx.Graphics.Shader.StructuredIr { context.LeaveBlock(block, operation); } - else if (operation.Inst != Instruction.CallOutArgument) + else { - AddOperation(context, opNode); + AddOperation(context, operation); } } } @@ -68,32 +68,13 @@ namespace Ryujinx.Graphics.Shader.StructuredIr return context.Info; } - private static void AddOperation(StructuredProgramContext context, LinkedListNode<INode> opNode) + private static void AddOperation(StructuredProgramContext context, Operation operation) { - Operation operation = (Operation)opNode.Value; - Instruction inst = operation.Inst; - bool isCall = inst == Instruction.Call; - int sourcesCount = operation.SourcesCount; int outDestsCount = operation.DestsCount != 0 ? operation.DestsCount - 1 : 0; - List<Operand> callOutOperands = new List<Operand>(); - - if (isCall) - { - LinkedListNode<INode> scan = opNode.Next; - - while (scan != null && scan.Value is Operation nextOp && nextOp.Inst == Instruction.CallOutArgument) - { - callOutOperands.Add(nextOp.Dest); - scan = scan.Next; - } - - sourcesCount += callOutOperands.Count; - } - IAstNode[] sources = new IAstNode[sourcesCount + outDestsCount]; for (int index = 0; index < operation.SourcesCount; index++) @@ -101,16 +82,6 @@ namespace Ryujinx.Graphics.Shader.StructuredIr sources[index] = context.GetOperandUse(operation.GetSource(index)); } - if (isCall) - { - for (int index = 0; index < callOutOperands.Count; index++) - { - sources[operation.SourcesCount + index] = context.GetOperandDef(callOutOperands[index]); - } - - callOutOperands.Clear(); - } - for (int index = 0; index < outDestsCount; index++) { AstOperand oper = context.GetOperandDef(operation.GetDest(1 + index)); |