Generate scaling helper functions on IR (#4714)

* Generate scaling helper functions on IR

* Delete unused code

* Split RewriteTextureSample and move gather bias add to an earlier pass

* Remove using

* Shader cache version bump
This commit is contained in:
gdkchan
2023-05-25 17:46:58 -03:00
committed by GitHub
parent 2c9715acf6
commit 8f0c89ffd6
25 changed files with 560 additions and 584 deletions

View File

@@ -307,6 +307,11 @@ namespace Ryujinx.Graphics.Shader.Translation
return context.Add(fpType | Instruction.Minimum, Local(), a, b);
}
public static Operand FPModulo(this EmitterContext context, Operand a, Operand b, Instruction fpType = Instruction.FP32)
{
return context.Add(fpType | Instruction.Modulo, Local(), a, b);
}
public static Operand FPMultiply(this EmitterContext context, Operand a, Operand b, Instruction fpType = Instruction.FP32)
{
return context.Add(fpType | Instruction.Multiply, Local(), a, b);
@@ -656,7 +661,6 @@ namespace Ryujinx.Graphics.Shader.Translation
public static void Return(this EmitterContext context, Operand returnValue)
{
context.PrepareForReturn();
context.Add(Instruction.Return, null, returnValue);
}