From 7ce5584f9e0d86f17ea4fc781483f60cfa288340 Mon Sep 17 00:00:00 2001 From: gdkchan Date: Sat, 7 Dec 2019 01:54:28 -0300 Subject: Support depth clip mode and disable shader fast math optimization on NVIDIA as a workaround for compiler bugs (?) --- .../Converters/DepthModeConverter.cs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 Ryujinx.Graphics.OpenGL/Converters/DepthModeConverter.cs (limited to 'Ryujinx.Graphics.OpenGL/Converters') 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}\"."); + } + } +} -- cgit v1.2.3