From 2068445939e1b39f3e07f64aa11b93491d1116a7 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Mon, 3 Oct 2022 20:40:22 -0300 Subject: Fix shader SULD (bindless) instruction using wrong register as handle (#3732) * GLSL: Do not generate scale helpers if we have no textures * Fix shader SULD (bindless) instruction using wrong register as handle --- Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Ryujinx.Graphics.Shader/CodeGen') diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs index ff808b04..91fd286d 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs +++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Declarations.cs @@ -257,7 +257,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl DeclareSupportUniformBlock(context, context.Config.Stage, scaleElements); - if (context.Config.UsedFeatures.HasFlag(FeatureFlags.IntegerSampling)) + if (context.Config.UsedFeatures.HasFlag(FeatureFlags.IntegerSampling) && scaleElements != 0) { AppendHelperFunction(context, $"Ryujinx.Graphics.Shader/CodeGen/Glsl/HelperFunctions/TexelFetchScale_{stage}.glsl"); context.AppendLine(); -- cgit v1.2.3