Fix instructions

This commit is contained in:
Isaac Marovitz 2023-10-09 11:12:04 -04:00 committed by Isaac Marovitz
parent d2ec22a01b
commit ce5f383f5d
3 changed files with 7 additions and 4 deletions

View file

@ -137,8 +137,10 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
return Store(context, operation);
case Instruction.TextureSample:
return TextureSample(context, operation);
case Instruction.TextureSize:
return TextureSize(context, operation);
case Instruction.TextureQuerySamples:
return "|| TEXTURE QUERY SIZE ||";
case Instruction.TextureQuerySize:
return TextureQuerySize(context, operation);
case Instruction.VectorExtract:
return VectorExtract(context, operation);
case Instruction.VoteAllEqual:

View file

@ -119,7 +119,8 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
Add(Instruction.Subtract, InstType.OpBinary, "-", 2);
Add(Instruction.SwizzleAdd, InstType.CallTernary, HelperFunctionNames.SwizzleAdd);
Add(Instruction.TextureSample, InstType.Special);
Add(Instruction.TextureSize, InstType.Special);
Add(Instruction.TextureQuerySamples, InstType.Special);
Add(Instruction.TextureQuerySize, InstType.Special);
Add(Instruction.Truncate, InstType.CallUnary, "trunc");
Add(Instruction.UnpackDouble2x32, 0); // MSL does not have a 64-bit FP
Add(Instruction.UnpackHalf2x16, InstType.CallUnary, "unpack_unorm2x16_to_half");

View file

@ -269,7 +269,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Msl.Instructions
return swizzle;
}
public static string TextureSize(CodeGenContext context, AstOperation operation)
public static string TextureQuerySize(CodeGenContext context, AstOperation operation)
{
AstTextureOperation texOp = (AstTextureOperation)operation;