diff --git a/pcsx2/GS/Renderers/OpenGL/GLState.cpp b/pcsx2/GS/Renderers/OpenGL/GLState.cpp index 548b2a036e..7a7f67a5b3 100644 --- a/pcsx2/GS/Renderers/OpenGL/GLState.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GLState.cpp @@ -23,7 +23,6 @@ namespace GLState GSVector4i scissor; bool point_size = false; - float line_width = 1.0f; bool blend; u16 eq_RGB; diff --git a/pcsx2/GS/Renderers/OpenGL/GLState.h b/pcsx2/GS/Renderers/OpenGL/GLState.h index 0db75ecff4..0383e0480e 100644 --- a/pcsx2/GS/Renderers/OpenGL/GLState.h +++ b/pcsx2/GS/Renderers/OpenGL/GLState.h @@ -25,7 +25,6 @@ namespace GLState extern GSVector4i scissor; extern bool point_size; - extern float line_width; extern bool blend; extern u16 eq_RGB; diff --git a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp index 7561f5ff19..43e259399e 100644 --- a/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp +++ b/pcsx2/GS/Renderers/OpenGL/GSDeviceOGL.cpp @@ -226,15 +226,14 @@ bool GSDeviceOGL::Create(HostDisplay* display) m_features.framebuffer_fetch = GLLoader::found_framebuffer_fetch; m_features.dual_source_blend = GLLoader::has_dual_source_blend && !GSConfig.DisableDualSourceBlend; m_features.stencil_buffer = true; + // Wide line support in GL is deprecated as of 3.1, so we will just do it in the Geometry Shader. + m_features.line_expand = false; GLint point_range[2] = {}; - GLint line_range[2] = {}; glGetIntegerv(GL_ALIASED_POINT_SIZE_RANGE, point_range); - glGetIntegerv(GL_ALIASED_LINE_WIDTH_RANGE, line_range); m_features.point_expand = (point_range[0] <= static_cast(GSConfig.UpscaleMultiplier) && point_range[1] >= static_cast(GSConfig.UpscaleMultiplier)); - m_features.line_expand = (line_range[0] <= static_cast(GSConfig.UpscaleMultiplier) && line_range[1] >= static_cast(GSConfig.UpscaleMultiplier)); - Console.WriteLn("Using %s for point expansion and %s for line expansion.", - m_features.point_expand ? "hardware" : "geometry shaders", m_features.line_expand ? "hardware" : "geometry shaders"); + + Console.WriteLn("Using %s for point expansion.", m_features.point_expand ? "hardware" : "geometry shaders"); { auto shader = Host::ReadResourceFileToString("shaders/opengl/common_header.glsl"); @@ -637,8 +636,6 @@ void GSDeviceOGL::ResetAPIState() { if (GLState::point_size) glDisable(GL_PROGRAM_POINT_SIZE); - if (GLState::line_width != 1.0f) - glLineWidth(1.0f); } void GSDeviceOGL::RestoreAPIState() @@ -691,8 +688,6 @@ void GSDeviceOGL::RestoreAPIState() if (GLState::point_size) glEnable(GL_PROGRAM_POINT_SIZE); - if (GLState::line_width != 1.0f) - glLineWidth(GLState::line_width); } void GSDeviceOGL::DrawPrimitive() @@ -1967,12 +1962,6 @@ void GSDeviceOGL::RenderHW(GSHWDrawConfig& config) glDisable(GL_PROGRAM_POINT_SIZE); GLState::point_size = point_size_enabled; } - const float line_width = config.line_expand ? static_cast(GSConfig.UpscaleMultiplier) : 1.0f; - if (GLState::line_width != line_width) - { - GLState::line_width = line_width; - glLineWidth(line_width); - } if (config.destination_alpha == GSHWDrawConfig::DestinationAlphaMode::PrimIDTracking) {