mirror of
https://github.com/Ryujinx/Ryujinx.git
synced 2025-08-04 07:12:24 -07:00
Depth Sampler Fixes
This commit is contained in:
committed by
Isaac Marovitz
parent
8b2cc4ccf1
commit
3e1f624308
@@ -175,20 +175,25 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
||||
}
|
||||
else
|
||||
{
|
||||
texCall += "sample(";
|
||||
texCall += "sample";
|
||||
|
||||
texCall += $"samp_{samplerName}";
|
||||
if (isGather)
|
||||
{
|
||||
texCall += "_gather";
|
||||
}
|
||||
|
||||
if (isShadow)
|
||||
{
|
||||
texCall += "_compare";
|
||||
}
|
||||
|
||||
texCall += $"(samp_{samplerName}";
|
||||
}
|
||||
|
||||
int coordsCount = texOp.Type.GetDimensions();
|
||||
|
||||
int pCount = coordsCount;
|
||||
|
||||
if (isShadow && !isGather)
|
||||
{
|
||||
pCount++;
|
||||
}
|
||||
|
||||
void Append(string str)
|
||||
{
|
||||
texCall += ", " + str;
|
||||
@@ -224,6 +229,13 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
|
||||
texCall += ", " + Src(AggregateType.S32);
|
||||
}
|
||||
|
||||
if (isShadow)
|
||||
{
|
||||
texCall += ", " + Src(AggregateType.S32);
|
||||
}
|
||||
|
||||
// TODO: Support offsets
|
||||
|
||||
texCall += ")" + (colorIsVector ? GetMaskMultiDest(texOp.Index) : "");
|
||||
|
||||
return texCall;
|
||||
|
Reference in New Issue
Block a user