From 73bb0712a85308c9f69dfbc5123e0d30bdf4fdde Mon Sep 17 00:00:00 2001 From: Samuliak Date: Thu, 16 May 2024 16:24:13 +0200 Subject: [PATCH] don't declare samplers for separate textures --- src/Ryujinx.Graphics.Shader/CodeGen/Msl/MslGenerator.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/MslGenerator.cs b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/MslGenerator.cs index 5852deca7c..eea78a9ee7 100644 --- a/src/Ryujinx.Graphics.Shader/CodeGen/Msl/MslGenerator.cs +++ b/src/Ryujinx.Graphics.Shader/CodeGen/Msl/MslGenerator.cs @@ -137,7 +137,11 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl { var textureTypeName = texture.Type.ToMslTextureType(); args = args.Append($"{textureTypeName} tex_{texture.Name} [[texture({texture.Binding})]]").ToArray(); - args = args.Append($"sampler samp_{texture.Name} [[sampler({texture.Binding})]]").ToArray(); + // If the texture is not separate, we need to declare a sampler + if (!texture.Separate) + { + args = args.Append($"sampler samp_{texture.Name} [[sampler({texture.Binding})]]").ToArray(); + } } }