diff --git a/src/video_core/renderer_opengl/gl_rasterizer.cpp b/src/video_core/renderer_opengl/gl_rasterizer.cpp index 7cd522da0f..a0b0274fb7 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer.cpp @@ -428,9 +428,7 @@ void RasterizerOpenGL::Clear() { bool use_stencil{}; OpenGLState prev_state{OpenGLState::GetCurState()}; - SCOPE_EXIT({ - prev_state.Apply(); - }); + SCOPE_EXIT({ prev_state.Apply(); }); OpenGLState clear_state{OpenGLState::GetCurState()}; clear_state.SetDefaultViewports(); @@ -1205,9 +1203,9 @@ void RasterizerOpenGL::SyncPointState() { const auto& regs = system.GPU().Maxwell3D().regs; // Limit the point size to 1 since nouveau sometimes sets a point size of 0 (and that's invalid // in OpenGL). - state.point.program_control = regs.vp_point_size.enable != 0; - state.point.sprite = regs.point_sprite_enable != 0; - state.point.size = std::max(1.0f, regs.point_size); + oglEnable(GL_PROGRAM_POINT_SIZE, regs.vp_point_size.enable); + oglEnable(GL_POINT_SPRITE, regs.point_sprite_enable); + glPointSize(std::max(1.0f, regs.point_size)); } void RasterizerOpenGL::SyncPolygonOffset() { diff --git a/src/video_core/renderer_opengl/gl_state.cpp b/src/video_core/renderer_opengl/gl_state.cpp index 732cb3a3c5..02b3455cc4 100644 --- a/src/video_core/renderer_opengl/gl_state.cpp +++ b/src/video_core/renderer_opengl/gl_state.cpp @@ -126,14 +126,6 @@ void OpenGLState::ApplyClipDistances() { } } -void OpenGLState::ApplyPointSize() { - Enable(GL_PROGRAM_POINT_SIZE, cur_state.point.program_control, point.program_control); - Enable(GL_POINT_SPRITE, cur_state.point.sprite, point.sprite); - if (UpdateValue(cur_state.point.size, point.size)) { - glPointSize(point.size); - } -} - void OpenGLState::ApplyFragmentColorClamp() { if (UpdateValue(cur_state.fragment_color_clamp.enabled, fragment_color_clamp.enabled)) { glClampColor(GL_CLAMP_FRAGMENT_COLOR_ARB, @@ -445,7 +437,6 @@ void OpenGLState::Apply() { ApplyShaderProgram(); ApplyProgramPipeline(); ApplyClipDistances(); - ApplyPointSize(); ApplyFragmentColorClamp(); ApplyMultisample(); ApplyRasterizerDiscard(); diff --git a/src/video_core/renderer_opengl/gl_state.h b/src/video_core/renderer_opengl/gl_state.h index 5dda9e88f7..acd24c0420 100644 --- a/src/video_core/renderer_opengl/gl_state.h +++ b/src/video_core/renderer_opengl/gl_state.h @@ -130,12 +130,6 @@ public: }; std::array viewports; - struct { - bool program_control = false; // GL_PROGRAM_POINT_SIZE - bool sprite = false; // GL_POINT_SPRITE - GLfloat size = 1.0f; // GL_POINT_SIZE - } point; - struct { bool point_enable = false; bool line_enable = false; @@ -176,7 +170,6 @@ public: void ApplyShaderProgram(); void ApplyProgramPipeline(); void ApplyClipDistances(); - void ApplyPointSize(); void ApplyFragmentColorClamp(); void ApplyMultisample(); void ApplySRgb();