diff options
Diffstat (limited to 'Ryujinx.Graphics.Shader/IntermediateRepresentation/Operation.cs')
-rw-r--r-- | Ryujinx.Graphics.Shader/IntermediateRepresentation/Operation.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Shader/IntermediateRepresentation/Operation.cs b/Ryujinx.Graphics.Shader/IntermediateRepresentation/Operation.cs index 955beafd..96132633 100644 --- a/Ryujinx.Graphics.Shader/IntermediateRepresentation/Operation.cs +++ b/Ryujinx.Graphics.Shader/IntermediateRepresentation/Operation.cs @@ -180,6 +180,18 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation _sources[index] = source; } + public void InsertSource(int index, Operand source) + { + Operand[] newSources = new Operand[_sources.Length + 1]; + + Array.Copy(_sources, 0, newSources, 0, index); + Array.Copy(_sources, index, newSources, index + 1, _sources.Length - index); + + newSources[index] = source; + + _sources = newSources; + } + protected void RemoveSource(int index) { SetSource(index, null); |