aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2021-01-27 20:59:47 -0300
committerGitHub <noreply@github.com>2021-01-28 10:59:47 +1100
commit4b7c7dab9e33faaf4eb58342f1f7ad8ada354591 (patch)
treed912e9e3434fb3ba53afad5fee216eadde731cc6 /Ryujinx.Graphics.Shader/Translation/EmitterContext.cs
parentdcce4070719a3798bb96d3aa02b9ba02a7fecc16 (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/Translation/EmitterContext.cs')
-rw-r--r--Ryujinx.Graphics.Shader/Translation/EmitterContext.cs11
1 files changed, 11 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs b/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs
index d5d30f12..df6b0839 100644
--- a/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs
+++ b/Ryujinx.Graphics.Shader/Translation/EmitterContext.cs
@@ -37,6 +37,17 @@ namespace Ryujinx.Graphics.Shader.Translation
return dest;
}
+ public (Operand, Operand) Add(Instruction inst, (Operand, Operand) dest, params Operand[] sources)
+ {
+ Operand[] dests = new[] { dest.Item1, dest.Item2 };
+
+ Operation operation = new Operation(inst, 0, dests, sources);
+
+ Add(operation);
+
+ return dest;
+ }
+
public void Add(Operation operation)
{
_operations.Add(operation);