Fix instructions

This commit is contained in:
Isaac Marovitz 2023-10-09 11:12:04 -04:00
parent a19fbe3d5f
commit e8e7e1b009
No known key found for this signature in database
GPG Key ID: 97250B2B09A132E1
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;