mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2024-12-20 08:22:02 +00:00
don't declare samplers for separate textures
This commit is contained in:
parent
75781ba698
commit
73bb0712a8
1 changed files with 5 additions and 1 deletions
|
@ -137,9 +137,13 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl
|
||||||
{
|
{
|
||||||
var textureTypeName = texture.Type.ToMslTextureType();
|
var textureTypeName = texture.Type.ToMslTextureType();
|
||||||
args = args.Append($"{textureTypeName} tex_{texture.Name} [[texture({texture.Binding})]]").ToArray();
|
args = args.Append($"{textureTypeName} tex_{texture.Name} [[texture({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();
|
args = args.Append($"sampler samp_{texture.Name} [[sampler({texture.Binding})]]").ToArray();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return $"{funcKeyword} {returnType} {funcName ?? function.Name}({string.Join(", ", args)})";
|
return $"{funcKeyword} {returnType} {funcName ?? function.Name}({string.Join(", ", args)})";
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue