summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer.cpp11
-rw-r--r--src/video_core/renderer_opengl/gl_state.h2
2 files changed, 11 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp
index 98fb5a9aa..edb285a66 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp
@@ -628,6 +628,7 @@ void RasterizerOpenGL::DrawArrays() {
SyncCullMode();
SyncPrimitiveRestart();
SyncScissorTest(state);
+ SyncClipEnabled();
// Alpha Testing is synced on shaders.
SyncTransformFeedback();
SyncPointState();
@@ -1010,7 +1011,15 @@ void RasterizerOpenGL::SyncViewport(OpenGLState& current_state) {
}
void RasterizerOpenGL::SyncClipEnabled() {
- UNREACHABLE();
+ const auto& regs = Core::System::GetInstance().GPU().Maxwell3D().regs;
+ state.clip_distance[0] = regs.clip_distance_enabled.c0 != 0;
+ state.clip_distance[1] = regs.clip_distance_enabled.c1 != 0;
+ state.clip_distance[2] = regs.clip_distance_enabled.c2 != 0;
+ state.clip_distance[3] = regs.clip_distance_enabled.c3 != 0;
+ state.clip_distance[4] = regs.clip_distance_enabled.c4 != 0;
+ state.clip_distance[5] = regs.clip_distance_enabled.c5 != 0;
+ state.clip_distance[6] = regs.clip_distance_enabled.c6 != 0;
+ state.clip_distance[7] = regs.clip_distance_enabled.c7 != 0;
}
void RasterizerOpenGL::SyncClipCoef() {
diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h
index 0bf19ed07..ad29aade6 100644
--- a/src/video_core/renderer_opengl/gl_state.h
+++ b/src/video_core/renderer_opengl/gl_state.h
@@ -185,7 +185,7 @@ public:
GLfloat clamp;
} polygon_offset;
- std::array<bool, 2> clip_distance; // GL_CLIP_DISTANCE
+ std::array<bool, 8> clip_distance; // GL_CLIP_DISTANCE
OpenGLState();