소스 검색

Fix shader image load/store array index register (#1637)

* Fix shader image load/store array index register

* Y should come before the array index
gdkchan 5 년 전
부모
커밋
973a615d40
1개의 변경된 파일2개의 추가작업 그리고 6개의 파일을 삭제
  1. 2 6
      Ryujinx.Graphics.Shader/Instructions/InstEmitTexture.cs

+ 2 - 6
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;
             }