mirror of
https://git.743378673.xyz/MeloNX/MeloNX.git
synced 2025-07-20 05:47:11 +02:00
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:
parent
2c9715acf6
commit
8f0c89ffd6
25 changed files with 560 additions and 584 deletions
|
@ -27,10 +27,5 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
|||
CbufSlot = cbufSlot;
|
||||
Handle = handle;
|
||||
}
|
||||
|
||||
public AstTextureOperation WithType(SamplerType type)
|
||||
{
|
||||
return new AstTextureOperation(Inst, type, Format, Flags, CbufSlot, Handle, Index);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -104,6 +104,7 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
|||
Add(Instruction.MaximumU32, AggregateType.U32, AggregateType.U32, AggregateType.U32);
|
||||
Add(Instruction.Minimum, AggregateType.Scalar, AggregateType.Scalar, AggregateType.Scalar);
|
||||
Add(Instruction.MinimumU32, AggregateType.U32, AggregateType.U32, AggregateType.U32);
|
||||
Add(Instruction.Modulo, AggregateType.Scalar, AggregateType.Scalar, AggregateType.Scalar);
|
||||
Add(Instruction.Multiply, AggregateType.Scalar, AggregateType.Scalar, AggregateType.Scalar);
|
||||
Add(Instruction.MultiplyHighS32, AggregateType.S32, AggregateType.S32, AggregateType.S32);
|
||||
Add(Instruction.MultiplyHighU32, AggregateType.U32, AggregateType.U32, AggregateType.U32);
|
||||
|
|
|
@ -8,11 +8,11 @@ namespace Ryujinx.Graphics.Shader.StructuredIr
|
|||
{
|
||||
static class StructuredProgram
|
||||
{
|
||||
public static StructuredProgramInfo MakeStructuredProgram(Function[] functions, ShaderConfig config)
|
||||
public static StructuredProgramInfo MakeStructuredProgram(IReadOnlyList<Function> functions, ShaderConfig config)
|
||||
{
|
||||
StructuredProgramContext context = new StructuredProgramContext(config);
|
||||
|
||||
for (int funcIndex = 0; funcIndex < functions.Length; funcIndex++)
|
||||
for (int funcIndex = 0; funcIndex < functions.Count; funcIndex++)
|
||||
{
|
||||
Function function = functions[funcIndex];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue