diff options
| author | riperiperi <rhy3756547@hotmail.com> | 2020-04-30 02:47:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-30 11:47:24 +1000 |
| commit | c2ac45adc5e735f752c128990e022252a6e0a426 (patch) | |
| tree | e73af63d2f3be0ee0b94547c0bf70230c9af17e2 /Ryujinx.Graphics.Gpu | |
| parent | ec620e2de0e65eac10bff64f0774abcd6857c743 (diff) | |
Fix depth clamp enable bit, unit scale for polygon offset. (#1178)
Verified with deko3d and opengl driver code.
Diffstat (limited to 'Ryujinx.Graphics.Gpu')
| -rw-r--r-- | Ryujinx.Graphics.Gpu/Engine/Methods.cs | 3 | ||||
| -rw-r--r-- | Ryujinx.Graphics.Gpu/State/ViewVolumeClipControl.cs | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/Ryujinx.Graphics.Gpu/Engine/Methods.cs b/Ryujinx.Graphics.Gpu/Engine/Methods.cs index ddb6e052..a517ae05 100644 --- a/Ryujinx.Graphics.Gpu/Engine/Methods.cs +++ b/Ryujinx.Graphics.Gpu/Engine/Methods.cs @@ -394,8 +394,7 @@ namespace Ryujinx.Graphics.Gpu.Engine private void UpdateDepthClampState(GpuState state) { ViewVolumeClipControl clip = state.Get<ViewVolumeClipControl>(MethodOffset.ViewVolumeClipControl); - _context.Renderer.Pipeline.SetDepthClamp((clip & ViewVolumeClipControl.DepthClampNear) != 0, - (clip & ViewVolumeClipControl.DepthClampFar) != 0); + _context.Renderer.Pipeline.SetDepthClamp((clip & ViewVolumeClipControl.DepthClampDisabled) == 0); } /// <summary> diff --git a/Ryujinx.Graphics.Gpu/State/ViewVolumeClipControl.cs b/Ryujinx.Graphics.Gpu/State/ViewVolumeClipControl.cs index 4e12c424..ace8342c 100644 --- a/Ryujinx.Graphics.Gpu/State/ViewVolumeClipControl.cs +++ b/Ryujinx.Graphics.Gpu/State/ViewVolumeClipControl.cs @@ -6,7 +6,6 @@ namespace Ryujinx.Graphics.Gpu.State enum ViewVolumeClipControl { ForceDepthRangeZeroToOne = 1 << 0, - DepthClampNear = 1 << 3, - DepthClampFar = 1 << 4, + DepthClampDisabled = 1 << 11, } }
\ No newline at end of file |
