From 7c53b69c300def240648900aafeca6ef774ac8a5 Mon Sep 17 00:00:00 2001 From: riperiperi Date: Fri, 18 Nov 2022 02:37:37 +0000 Subject: SPIR-V: Fix unscaling helper not being able to find Array textures (#3863) The type in the `texOp` in the textureSize instruction doesn't have the exact type on SPIR-V (for example, it is missing the Array flag). This PR gives it the proper type before giving it to the unscaling helper. This fixes the ground textures being broken on Pokemon Scarlet/Violet when scaling. It wasn't finding the texture, so the descriptor index it provided was -1... --- Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Ryujinx.Graphics.Shader/CodeGen') diff --git a/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs b/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs index c743a274..ea83061e 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs +++ b/Ryujinx.Graphics.Shader/CodeGen/Spirv/Instructions.cs @@ -1829,7 +1829,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Spirv if (texOp.Index < 2 || (type & SamplerType.Mask) == SamplerType.Texture3D) { - result = ScalingHelpers.ApplyUnscaling(context, texOp, result, isBindless, isIndexed); + result = ScalingHelpers.ApplyUnscaling(context, texOp.WithType(type), result, isBindless, isIndexed); } return new OperationResult(AggregateType.S32, result); -- cgit v1.2.3