From 4b7c7dab9e33faaf4eb58342f1f7ad8ada354591 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Wed, 27 Jan 2021 20:59:47 -0300 Subject: Support multiple destination operands on shader IR and shuffle predicates (#1964) * Support multiple destination operands on shader IR and shuffle predicates * Cache version change --- .../IntermediateRepresentation/PhiNode.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'Ryujinx.Graphics.Shader/IntermediateRepresentation/PhiNode.cs') 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 _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; -- cgit v1.2.3