diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2021-11-14 21:37:07 -0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-14 21:37:07 -0300 |
| commit | b9d83cc97ee1cb8c60d9b01c162bab742567fe6e (patch) | |
| tree | 7cfe5cffd688dd8ca5a06e91c85e5e4cfbcce9c6 /Ryujinx.Graphics.Shader/CodeGen/Glsl | |
| parent | 788aec511ffe64c9a22024d1b88334ec8e3b5ad6 (diff) | |
Fix shader integer from/to double conversion (#2831)
Diffstat (limited to 'Ryujinx.Graphics.Shader/CodeGen/Glsl')
| -rw-r--r-- | Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenHelper.cs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenHelper.cs b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenHelper.cs index 1fa25399..a52e70c3 100644 --- a/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenHelper.cs +++ b/Ryujinx.Graphics.Shader/CodeGen/Glsl/Instructions/InstGenHelper.cs @@ -53,10 +53,14 @@ namespace Ryujinx.Graphics.Shader.CodeGen.Glsl.Instructions 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"); - Add(Instruction.ConvertU32ToFP, InstType.CallUnary, "float"); + Add(Instruction.ConvertFP32ToS32, InstType.CallUnary, "int"); + Add(Instruction.ConvertFP32ToU32, InstType.CallUnary, "uint"); + Add(Instruction.ConvertFP64ToS32, InstType.CallUnary, "int"); + Add(Instruction.ConvertFP64ToU32, InstType.CallUnary, "uint"); + Add(Instruction.ConvertS32ToFP32, InstType.CallUnary, "float"); + Add(Instruction.ConvertS32ToFP64, InstType.CallUnary, "double"); + Add(Instruction.ConvertU32ToFP32, InstType.CallUnary, "float"); + Add(Instruction.ConvertU32ToFP64, InstType.CallUnary, "double"); Add(Instruction.Cosine, InstType.CallUnary, "cos"); Add(Instruction.Ddx, InstType.CallUnary, "dFdx"); Add(Instruction.Ddy, InstType.CallUnary, "dFdy"); |
