diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-12-26 01:57:10 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2020-02-28 20:53:35 +0100 |
commit | 2a662fea363027817a73a62a5e4a9d0066fb43ee (patch) | |
tree | ebedf3ebea5fde257e7c91e03e0ae07cecd4aca7 /src/video_core/renderer_opengl/gl_rasterizer.cpp | |
parent | gl_state: Remove depth tracking (diff) | |
download | yuzu-2a662fea363027817a73a62a5e4a9d0066fb43ee.tar yuzu-2a662fea363027817a73a62a5e4a9d0066fb43ee.tar.gz yuzu-2a662fea363027817a73a62a5e4a9d0066fb43ee.tar.bz2 yuzu-2a662fea363027817a73a62a5e4a9d0066fb43ee.tar.lz yuzu-2a662fea363027817a73a62a5e4a9d0066fb43ee.tar.xz yuzu-2a662fea363027817a73a62a5e4a9d0066fb43ee.tar.zst yuzu-2a662fea363027817a73a62a5e4a9d0066fb43ee.zip |
Diffstat (limited to 'src/video_core/renderer_opengl/gl_rasterizer.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 6bb6f9f47..acdae849c 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -977,8 +977,6 @@ void RasterizerOpenGL::SyncViewport(OpenGLState& current_state) { viewport.depth_range_far = src.depth_range_far; viewport.depth_range_near = src.depth_range_near; } - state.depth_clamp.far_plane = regs.view_volume_clip_control.depth_clamp_far != 0; - state.depth_clamp.near_plane = regs.view_volume_clip_control.depth_clamp_near != 0; bool flip_y = false; if (regs.viewport_transform[0].scale_y < 0.0) { @@ -994,6 +992,16 @@ void RasterizerOpenGL::SyncViewport(OpenGLState& current_state) { : GL_NEGATIVE_ONE_TO_ONE; } +void RasterizerOpenGL::SyncDepthClamp() { + const auto& regs = system.GPU().Maxwell3D().regs; + const auto& state = regs.view_volume_clip_control; + + UNIMPLEMENTED_IF_MSG(state.depth_clamp_far != state.depth_clamp_near, + "Unimplemented Depth clamp separation!"); + + oglEnable(GL_DEPTH_CLAMP, state.depth_clamp_far || state.depth_clamp_near); +} + void RasterizerOpenGL::SyncClipEnabled( const std::array<bool, Maxwell::Regs::NumClipDistances>& clip_mask) { |