mirror of
https://git.ryujinx.app/ryubing/ryujinx.git
synced 2025-07-29 00:59:51 -06:00
Support depth clip mode and disable shader fast math optimization on NVIDIA as a workaround for compiler bugs (?)
This commit is contained in:
20
Ryujinx.Graphics.OpenGL/Converters/DepthModeConverter.cs
Normal file
20
Ryujinx.Graphics.OpenGL/Converters/DepthModeConverter.cs
Normal file
@ -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}\".");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user