add: textures and samplers as shader arguments & fix: issue with casting

This commit is contained in:
Samuliak 2024-05-14 17:41:16 +02:00 committed by Isaac Marovitz
parent 6295153a28
commit 320c317113
4 changed files with 15 additions and 9 deletions

View file

@ -158,7 +158,9 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
bool colorIsVector = isGather || !isShadow;
string texCall = "texture.";
string samplerName = GetSamplerName(context.Properties, texOp);
string texCall = $"tex_{samplerName}";
texCall += ".";
int srcIndex = 0;
@ -175,9 +177,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
{
texCall += "sample(";
string samplerName = GetSamplerName(context.Properties, texOp);
texCall += samplerName;
texCall += $"samp_{samplerName}";
}
int coordsCount = texOp.Type.GetDimensions();