Sample LOD Level

This commit is contained in:
Isaac Marovitz 2024-05-27 23:41:11 -04:00
parent 63ab5b0639
commit 4e130e7e38
No known key found for this signature in database
GPG Key ID: 97250B2B09A132E1
1 changed files with 6 additions and 0 deletions

View File

@ -153,6 +153,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
bool isGather = (texOp.Flags & TextureFlags.Gather) != 0;
bool isShadow = (texOp.Type & SamplerType.Shadow) != 0;
bool intCoords = (texOp.Flags & TextureFlags.IntCoords) != 0;
bool hasLodLevel = (texOp.Flags & TextureFlags.LodLevel) != 0;
bool isArray = (texOp.Type & SamplerType.Array) != 0;
@ -234,6 +235,11 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
texCall += ", " + Src(AggregateType.S32);
}
if (hasLodLevel)
{
texCall += $", level({Src(coordType)})";
}
// TODO: Support offsets
texCall += ")" + (colorIsVector ? GetMaskMultiDest(texOp.Index) : "");