From 5271cfe70b88d4dc5feb3f5be71ffc3951e9a354 Mon Sep 17 00:00:00 2001 From: riperiperi Date: Fri, 21 May 2021 00:09:18 +0100 Subject: [PATCH] Fix dimensions check for scale eligibility (#2301) --- Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs | 2 +- Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs b/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs index d752b1b0..9b5440fb 100644 --- a/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs +++ b/Ryujinx.Graphics.Gpu/Shader/ShaderCache.cs @@ -36,7 +36,7 @@ namespace Ryujinx.Graphics.Gpu.Shader /// /// Version of the codegen (to be changed when codegen or guest format change). /// - private const ulong ShaderCodeGenVersion = 2300; + private const ulong ShaderCodeGenVersion = 2301; // Progress reporting helpers private volatile int _shaderCount; diff --git a/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs b/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs index b193d61e..85ac2836 100644 --- a/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs +++ b/Ryujinx.Graphics.Shader/Translation/ShaderConfig.cs @@ -257,7 +257,6 @@ namespace Ryujinx.Graphics.Shader.Translation bool accurateType) { var dimensions = type.GetDimensions(); - var isArray = type.HasFlag(SamplerType.Array); var isIndexed = type.HasFlag(SamplerType.Indexed); var usageFlags = TextureUsageFlags.None; @@ -266,9 +265,7 @@ namespace Ryujinx.Graphics.Shader.Translation { usageFlags |= TextureUsageFlags.NeedsScaleValue; - var canScale = (Stage == ShaderStage.Fragment || Stage == ShaderStage.Compute) && !isIndexed && !write && - ((dimensions == 2 && !isArray) || - (dimensions == 3 && isArray)); + var canScale = (Stage == ShaderStage.Fragment || Stage == ShaderStage.Compute) && !isIndexed && !write && dimensions == 2; if (!canScale) {