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/Translation/Ssa.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/Translation/Ssa.cs')
| -rw-r--r-- | Ryujinx.Graphics.Shader/Translation/Ssa.cs | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/Ryujinx.Graphics.Shader/Translation/Ssa.cs b/Ryujinx.Graphics.Shader/Translation/Ssa.cs index a4d763be..ff812e64 100644 --- a/Ryujinx.Graphics.Shader/Translation/Ssa.cs +++ b/Ryujinx.Graphics.Shader/Translation/Ssa.cs @@ -116,13 +116,18 @@ namespace Ryujinx.Graphics.Shader.Translation operation.SetSource(index, RenameLocal(operation.GetSource(index))); } - if (operation.Dest != null && operation.Dest.Type == OperandType.Register) + for (int index = 0; index < operation.DestsCount; index++) { - Operand local = Local(); + Operand dest = operation.GetDest(index); - localDefs[GetKeyFromRegister(operation.Dest.GetRegister())] = local; + if (dest.Type == OperandType.Register) + { + Operand local = Local(); + + localDefs[GetKeyFromRegister(dest.GetRegister())] = local; - operation.Dest = local; + operation.SetDest(index, local); + } } } @@ -185,9 +190,7 @@ namespace Ryujinx.Graphics.Shader.Translation return operand; } - LinkedListNode<INode> node = block.Operations.First; - - while (node != null) + for (LinkedListNode<INode> node = block.Operations.First; node != null; node = node.Next) { if (node.Value is Operation operation) { @@ -196,8 +199,6 @@ namespace Ryujinx.Graphics.Shader.Translation operation.SetSource(index, RenameGlobal(operation.GetSource(index))); } } - - node = node.Next; } } } |
