aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics.Shader/Translation/Optimizations
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2021-01-31 21:13:38 -0300
committerGitHub <noreply@github.com>2021-02-01 11:13:38 +1100
commit053dcfdb0572da9c03d4343a82ac69ac44e3276b (patch)
tree07c381d42fe44c1bc7e7c5daa61bce3427ebf9e3 /Ryujinx.Graphics.Shader/Translation/Optimizations
parentf93089a64f9586863e8a261af932d125e78230df (diff)
Use multiple dest operands for shader call instructions (#1975)
* Use multiple dest operands for shader call instructions * Passing opNode is no longer needed
Diffstat (limited to 'Ryujinx.Graphics.Shader/Translation/Optimizations')
-rw-r--r--Ryujinx.Graphics.Shader/Translation/Optimizations/Optimizer.cs9
1 files changed, 6 insertions, 3 deletions
diff --git a/Ryujinx.Graphics.Shader/Translation/Optimizations/Optimizer.cs b/Ryujinx.Graphics.Shader/Translation/Optimizations/Optimizer.cs
index 9a0815c3..61b1544f 100644
--- a/Ryujinx.Graphics.Shader/Translation/Optimizations/Optimizer.cs
+++ b/Ryujinx.Graphics.Shader/Translation/Optimizations/Optimizer.cs
@@ -289,7 +289,6 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations
case Instruction.AtomicSwap:
case Instruction.AtomicXor:
case Instruction.Call:
- case Instruction.CallOutArgument:
return true;
}
}
@@ -306,7 +305,9 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations
for (int index = 0; index < node.DestsCount; index++)
{
- if (node.GetDest(index).Type != OperandType.LocalVariable)
+ Operand dest = node.GetDest(index);
+
+ if (dest != null && dest.Type != OperandType.LocalVariable)
{
return false;
}
@@ -319,7 +320,9 @@ namespace Ryujinx.Graphics.Shader.Translation.Optimizations
{
for (int index = 0; index < node.DestsCount; index++)
{
- if (node.GetDest(index).UseOps.Count != 0)
+ Operand dest = node.GetDest(index);
+
+ if (dest != null && dest.UseOps.Count != 0)
{
return false;
}