Implement soft float64 conversion on shaders when host has no support (#5159)
* Implement soft float64 conversion on shaders when host has no support * Shader cache version bump * Fix rebase error
This commit is contained in:
parent
5813b2e354
commit
fe30c03cac
12 changed files with 222 additions and 4 deletions
|
@ -255,5 +255,35 @@ namespace Ryujinx.Graphics.Shader.IntermediateRepresentation
|
|||
|
||||
_sources = new Operand[] { source };
|
||||
}
|
||||
|
||||
public void TurnDoubleIntoFloat()
|
||||
{
|
||||
if ((Inst & ~Instruction.Mask) == Instruction.FP64)
|
||||
{
|
||||
Inst = (Inst & Instruction.Mask) | Instruction.FP32;
|
||||
}
|
||||
else
|
||||
{
|
||||
switch (Inst)
|
||||
{
|
||||
case Instruction.ConvertFP32ToFP64:
|
||||
case Instruction.ConvertFP64ToFP32:
|
||||
Inst = Instruction.Copy;
|
||||
break;
|
||||
case Instruction.ConvertFP64ToS32:
|
||||
Inst = Instruction.ConvertFP32ToS32;
|
||||
break;
|
||||
case Instruction.ConvertFP64ToU32:
|
||||
Inst = Instruction.ConvertFP32ToU32;
|
||||
break;
|
||||
case Instruction.ConvertS32ToFP64:
|
||||
Inst = Instruction.ConvertS32ToFP32;
|
||||
break;
|
||||
case Instruction.ConvertU32ToFP64:
|
||||
Inst = Instruction.ConvertU32ToFP32;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue