From 670431f4fa3d759da35e102002a8910bf0efbb9c Mon Sep 17 00:00:00 2001
From: gdk <gab.dark.100@gmail.com>
Date: Fri, 8 Apr 2022 16:35:45 -0300
Subject: [PATCH] SPIR-V: Fix field index for scale count

---
 Ryujinx.Graphics.Shader/CodeGen/Spirv/ScalingHelpers.cs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Ryujinx.Graphics.Shader/CodeGen/Spirv/ScalingHelpers.cs b/Ryujinx.Graphics.Shader/CodeGen/Spirv/ScalingHelpers.cs
index 1ddd17214..603348679 100644
--- a/Ryujinx.Graphics.Shader/CodeGen/Spirv/ScalingHelpers.cs
+++ b/Ryujinx.Graphics.Shader/CodeGen/Spirv/ScalingHelpers.cs
@@ -190,7 +190,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv
                 if (context.Config.Stage == ShaderStage.Vertex)
                 {
                     var scaleCountPointerType = context.TypePointer(StorageClass.Uniform, context.TypeS32());
-                    var scaleCountElemPointer = context.AccessChain(scaleCountPointerType, context.SupportBuffer, context.Constant(context.TypeU32(), 3));
+                    var scaleCountElemPointer = context.AccessChain(scaleCountPointerType, context.SupportBuffer, context.Constant(context.TypeU32(), 2));
                     var scaleCount = context.Load(context.TypeS32(), scaleCountElemPointer);
 
                     scaleIndex = context.IAdd(context.TypeU32(), scaleIndex, scaleCount);