diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-10-25 14:51:26 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-10-25 14:51:26 -0300 |
| commit | 973a615d405a83d5fc2f6a11ad12ba63c2a76465 (patch) | |
| tree | a7c1f0d7e654d5807453b42045dc59930bdd56e9 | |
| parent | 2f164917126ecef3a44c989e9442d2c663e58535 (diff) | |
Fix shader image load/store array index register (#1637)
* Fix shader image load/store array index register
* Y should come before the array index
| -rw-r--r-- | Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs b/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs index eaae993b..49e6cf5d 100644 --- a/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs +++ b/Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs @@ -40,8 +40,6 @@ namespace Ryujinx.Graphics.Shader.Instructions return context.Copy(Register(raIndex++, RegisterType.Gpr)); } - Operand arrayIndex = type.HasFlag(SamplerType.Array) ? Ra() : null; - List<Operand> sourcesList = new List<Operand>(); if (op.IsBindless) @@ -66,7 +64,7 @@ namespace Ryujinx.Graphics.Shader.Instructions if (type.HasFlag(SamplerType.Array)) { - sourcesList.Add(arrayIndex); + sourcesList.Add(Ra()); type |= SamplerType.Array; } @@ -193,8 +191,6 @@ namespace Ryujinx.Graphics.Shader.Instructions return context.Copy(Register(rbIndex++, RegisterType.Gpr)); } - Operand arrayIndex = type.HasFlag(SamplerType.Array) ? Ra() : null; - List<Operand> sourcesList = new List<Operand>(); if (op.IsBindless) @@ -219,7 +215,7 @@ namespace Ryujinx.Graphics.Shader.Instructions if (type.HasFlag(SamplerType.Array)) { - sourcesList.Add(arrayIndex); + sourcesList.Add(Ra()); type |= SamplerType.Array; } |
