diff options
author | gdkchan <gab.dark.100@gmail.com> | 2021-01-31 21:13:38 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-01 11:13:38 +1100 |
commit | 053dcfdb0572da9c03d4343a82ac69ac44e3276b (patch) | |
tree | 07c381d42fe44c1bc7e7c5daa61bce3427ebf9e3 /Ryujinx.Graphics.Shader/Translation/RegisterUsage.cs | |
parent | f93089a64f9586863e8a261af932d125e78230df (diff) |
Use multiple dest operands for shader call instructions (#1975)
* Use multiple dest operands for shader call instructions
* Passing opNode is no longer needed
Diffstat (limited to 'Ryujinx.Graphics.Shader/Translation/RegisterUsage.cs')
-rw-r--r-- | Ryujinx.Graphics.Shader/Translation/RegisterUsage.cs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Ryujinx.Graphics.Shader/Translation/RegisterUsage.cs b/Ryujinx.Graphics.Shader/Translation/RegisterUsage.cs index fd90391f..158ba5ef 100644 --- a/Ryujinx.Graphics.Shader/Translation/RegisterUsage.cs +++ b/Ryujinx.Graphics.Shader/Translation/RegisterUsage.cs @@ -299,21 +299,23 @@ namespace Ryujinx.Graphics.Shader.Translation var fru = frus[funcId.Value]; - Operand[] regs = new Operand[fru.InArguments.Length]; + Operand[] inRegs = new Operand[fru.InArguments.Length]; for (int i = 0; i < fru.InArguments.Length; i++) { - regs[i] = OperandHelper.Register(fru.InArguments[i]); + inRegs[i] = OperandHelper.Register(fru.InArguments[i]); } - operation.AppendOperands(regs); + operation.AppendSources(inRegs); + + Operand[] outRegs = new Operand[1 + fru.OutArguments.Length]; for (int i = 0; i < fru.OutArguments.Length; i++) { - Operation callOutArgOp = new Operation(Instruction.CallOutArgument, OperandHelper.Register(fru.OutArguments[i])); - - node = block.Operations.AddAfter(node, callOutArgOp); + outRegs[1 + i] = OperandHelper.Register(fru.OutArguments[i]); } + + operation.AppendDests(outRegs); } } } |