diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2020-03-03 11:02:08 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-03-03 15:02:08 +0100 |
| commit | dc97457bf0121b9383054ca14d3c525b56b92634 (patch) | |
| tree | ecd78f76805b16bb01ec8d81f99f1cb3a2a43895 /Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenHelper.cs | |
| parent | 3045c1a18644e50fd843dfce07d809e46d923ada (diff) | |
Initial support for double precision shader instructions. (#963)
* Implement DADD, DFMA and DMUL shader instructions
* Rename FP to FP32
* Correct double immediate
* Classic mistake
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenHelper.cs')
| -rw-r--r-- | Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenHelper.cs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenHelper.cs b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenHelper.cs index 8dec3499..15f9b666 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenHelper.cs +++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenHelper.cs @@ -50,6 +50,8 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions Add(Instruction.CompareLessU32, InstType.OpBinary, "<", 4); Add(Instruction.CompareNotEqual, InstType.OpBinaryCom, "!=", 5); Add(Instruction.ConditionalSelect, InstType.OpTernary, "?:", 12); + Add(Instruction.ConvertFP32ToFP64, InstType.CallUnary, "double"); + Add(Instruction.ConvertFP64ToFP32, InstType.CallUnary, "float"); Add(Instruction.ConvertFPToS32, InstType.CallUnary, "int"); Add(Instruction.ConvertFPToU32, InstType.CallUnary, "uint"); Add(Instruction.ConvertS32ToFP, InstType.CallUnary, "float"); @@ -83,6 +85,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions Add(Instruction.LogicalOr, InstType.OpBinaryCom, "||", 11); Add(Instruction.LoopBreak, InstType.OpNullary, "break"); Add(Instruction.LoopContinue, InstType.OpNullary, "continue"); + Add(Instruction.PackDouble2x32, InstType.Special); Add(Instruction.PackHalf2x16, InstType.Special); Add(Instruction.ShiftLeft, InstType.OpBinary, "<<", 3); Add(Instruction.ShiftRightS32, InstType.OpBinary, ">>", 3); @@ -113,6 +116,7 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions Add(Instruction.TextureSample, InstType.Special); Add(Instruction.TextureSize, InstType.Special); Add(Instruction.Truncate, InstType.CallUnary, "trunc"); + Add(Instruction.UnpackDouble2x32, InstType.Special); Add(Instruction.UnpackHalf2x16, InstType.Special); Add(Instruction.VoteAll, InstType.CallUnary, "allInvocationsARB"); Add(Instruction.VoteAllEqual, InstType.CallUnary, "allInvocationsEqualARB"); |
