diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2019-12-07 01:54:28 -0300 |
|---|---|---|
| committer | Thog <thog@protonmail.com> | 2020-01-09 02:13:00 +0100 |
| commit | 7ce5584f9e0d86f17ea4fc781483f60cfa288340 (patch) | |
| tree | 1fe59d43bbd7a84687f6ad65156704718eeb852c /Ryujinx.Graphics.OpenGL/Converters | |
| parent | 17fb11ddb98e94aaf494eaf6002ab149c5d54000 (diff) | |
Support depth clip mode and disable shader fast math optimization on NVIDIA as a workaround for compiler bugs (?)
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Converters')
| -rw-r--r-- | Ryujinx.Graphics.OpenGL/Converters/DepthModeConverter.cs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Converters/DepthModeConverter.cs b/Ryujinx.Graphics.OpenGL/Converters/DepthModeConverter.cs new file mode 100644 index 00000000..a02f69d2 --- /dev/null +++ b/Ryujinx.Graphics.OpenGL/Converters/DepthModeConverter.cs @@ -0,0 +1,20 @@ +using OpenTK.Graphics.OpenGL; +using Ryujinx.Graphics.GAL; +using System; + +namespace Ryujinx.Graphics.OpenGL +{ + static class DepthModeConverter + { + public static ClipDepthMode Convert(this DepthMode mode) + { + switch (mode) + { + case DepthMode.MinusOneToOne: return ClipDepthMode.NegativeOneToOne; + case DepthMode.ZeroToOne: return ClipDepthMode.ZeroToOne; + } + + throw new ArgumentException($"Invalid depth mode \"{mode}\"."); + } + } +} |
