Use multiple dest operands for shader call instructions (#1975)

* Use multiple dest operands for shader call instructions

* Passing opNode is no longer needed
This commit is contained in:
gdkchan 2021-01-31 21:13:38 -03:00 committed by GitHub
parent f93089a64f
commit 053dcfdb05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 40 additions and 45 deletions

View file

@ -1,4 +1,5 @@
using System;
using System.Diagnostics;
namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
{
@ -96,7 +97,27 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
Index = index;
}
public void AppendOperands(params Operand[] operands)
public void AppendDests(Operand[] operands)
{
int startIndex = _dests.Length;
Array.Resize(ref _dests, startIndex + operands.Length);
for (int index = 0; index < operands.Length; index++)
{
Operand dest = operands[index];
if (dest != null && dest.Type == OperandType.LocalVariable)
{
Debug.Assert(dest.AsgOp == null);
dest.AsgOp = this;
}
_dests[startIndex + index] = dest;
}
}
public void AppendSources(Operand[] operands)
{
int startIndex = _sources.Length;