diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2021-01-27 20:59:47 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-28 10:59:47 +1100 |
| commit | 4b7c7dab9e33faaf4eb58342f1f7ad8ada354591 (patch) | |
| tree | d912e9e3434fb3ba53afad5fee216eadde731cc6 /Ryujinx.Graphics.Shader/IntermediateRepresentation/PhiNode.cs | |
| parent | dcce4070719a3798bb96d3aa02b9ba02a7fecc16 (diff) | |
Support multiple destination operands on shader IR and shuffle predicates (#1964)
* Support multiple destination operands on shader IR and shuffle predicates
* Cache version change
Diffstat (limited to 'Ryujinx.Graphics.Shader/IntermediateRepresentation/PhiNode.cs')
| -rw-r--r-- | Ryujinx.Graphics.Shader/IntermediateRepresentation/PhiNode.cs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Shader/IntermediateRepresentation/PhiNode.cs b/Ryujinx.Graphics.Shader/IntermediateRepresentation/PhiNode.cs index 13ff41bd..8fa25ae9 100644 --- a/Ryujinx.Graphics.Shader/IntermediateRepresentation/PhiNode.cs +++ b/Ryujinx.Graphics.Shader/IntermediateRepresentation/PhiNode.cs @@ -1,3 +1,4 @@ +using System; using System.Collections.Generic; namespace Ryujinx.Graphics.Shader.IntermediateRepresentation @@ -12,6 +13,8 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation set => _dest = AssignDest(value); } + public int DestsCount => _dest != null ? 1 : 0; + private HashSet<BasicBlock> _blocks; private class PhiSource @@ -64,6 +67,16 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation } } + public Operand GetDest(int index) + { + if (index != 0) + { + throw new ArgumentOutOfRangeException(nameof(index)); + } + + return _dest; + } + public Operand GetSource(int index) { return _sources[index].Operand; |
