don't declare samplers for separate textures

This commit is contained in:
Samuliak 2024-05-16 16:24:13 +02:00 committed by Isaac Marovitz
parent 5741fb90f9
commit d13e4c5101
No known key found for this signature in database
GPG Key ID: 97250B2B09A132E1
1 changed files with 5 additions and 1 deletions

View File

@ -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();
}
}
}